From 4baffc8e53ece3c7261685fbf933dc6fc0269921 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Wed, 9 Dec 2020 22:16:43 -0500 Subject: [PATCH] SWDEV-264282 : fixing tracer_tool linking Change-Id: I0fd78c01595bbd506f42cf9dfb45f62b2124f704 --- test/CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a7511789c9..e07e7d8b91 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -69,6 +69,14 @@ add_custom_target( mytest COMMAND sh -xc "cp ${TEST_DIR}/golden_traces/tests_trace_cmp_levels.txt ${PROJECT_BINARY_DIR}/test/" ) +## Build HSA test +execute_process ( COMMAND sh -xc "if [ ! -e ${TEST_DIR}/hsa ] ; then git clone https://github.com/ROCmSoftwarePlatform/hsa-class.git ${TEST_DIR}/hsa; fi" ) +execute_process ( COMMAND sh -xc "if [ -e ${TEST_DIR}/hsa ] ; then cd ${TEST_DIR}/hsa && git fetch origin && git checkout ${HSA_REV}; fi" ) +set ( TMP ${TEST_DIR} ) +set ( TEST_DIR ${HSA_TEST_DIR} ) +add_subdirectory ( ${HSA_TEST_DIR} ${PROJECT_BINARY_DIR}/test/hsa ) +set ( TEST_DIR ${TMP} ) + ## Util sources file( GLOB UTIL_SRC "${HSA_TEST_DIR}/util/*.cpp" ) @@ -95,12 +103,6 @@ add_library ( ${CO_LIB_NAME} SHARED ${CO_LIB_SRC} ) target_include_directories ( ${CO_LIB_NAME} PRIVATE ${TEST_DIR} ${ROOT_DIR} ${ROOT_DIR}/inc ${GEN_INC_DIR} ${HSA_RUNTIME_INC_PATH} ${ROCM_INC_PATH} ) target_link_libraries ( ${CO_LIB_NAME} ${ROCTRACER_TARGET} c stdc++ ) -## Build HSA test -execute_process ( COMMAND sh -xc "if [ ! -e ${TEST_DIR}/hsa ] ; then git clone https://github.com/ROCmSoftwarePlatform/hsa-class.git ${TEST_DIR}/hsa; fi" ) -execute_process ( COMMAND sh -xc "if [ -e ${TEST_DIR}/hsa ] ; then cd ${TEST_DIR}/hsa && git fetch origin && git checkout ${HSA_REV}; fi" ) -set ( TEST_DIR ${HSA_TEST_DIR} ) -add_subdirectory ( ${TEST_DIR} ${PROJECT_BINARY_DIR}/test/hsa ) - ## copying run script execute_process ( COMMAND sh -xc "cp ${RUN_SCRIPT} ${PROJECT_BINARY_DIR}" ) execute_process ( COMMAND sh -xc "ln -s run.sh ${PROJECT_BINARY_DIR}/run_ci.sh" )