From 3c6f786cf63bce38e7c55eaf35d754f5e1ebcee6 Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Thu, 24 Mar 2016 13:20:25 -0500 Subject: [PATCH] revert CMakelists [ROCm/hip commit: 5e3428acc100327f2c420abf57fd5c37bb5c1821] --- projects/hip/tests/src/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/hip/tests/src/CMakeLists.txt b/projects/hip/tests/src/CMakeLists.txt index ce005bc386..81e5dd7838 100644 --- a/projects/hip/tests/src/CMakeLists.txt +++ b/projects/hip/tests/src/CMakeLists.txt @@ -40,12 +40,12 @@ if (${HIP_PLATFORM} STREQUAL "hcc") #Include HIP and HC since the tests need both of these: #Note below HSA path is surgically included only where necessary. include_directories(${HIP_PATH}/include) - include_directories(${HSA_PATH}/include) - # hip_hcc.o: - #add_library(hip_hcc STATIC ${HIP_PATH}/src/hip_hcc.cpp ) - add_library(hip_hcc STATIC ${HIP_PATH}/src/hip_hcc.cpp ${HIP_PATH}/src/hip_error.cpp ${HIP_PATH}/src/hip_device.cpp ${HIP_PATH}/src/hip_stream.cpp ${HIP_PATH}/src/hip_event.cpp ${HIP_PATH}/src/hip_memory.cpp ${HIP_PATH}/src/hip_peer.cpp ${HIP_PATH}/src/staging_buffer.cpp) - target_include_directories(hip_hcc PRIVATE ${HSA_PATH}/include ${CODEXL_SDK_ATAL_PATH}/include) + include_directories(${HSA_PATH}/include) + # This will create a subdir "hip_hcc" in the test build directory + # Any changes to hip_hcc source will be detected and force the library and then the tests to be rebuilt. + add_subdirectory(${HIP_PATH} hip_hcc) + link_directories(${CMAKE_CURRENT_BINARY_DIR}/hip_hcc) # search the local hip_hcc for libhip_hcc.a elseif (${HIP_PLATFORM} STREQUAL "nvcc") MESSAGE ("HIP_PLATFORM=nvcc") @@ -73,7 +73,7 @@ add_library(test_common OBJECT test_common.cpp ) macro (make_hip_executable exe cpp) if (${HIP_PLATFORM} STREQUAL "hcc") add_executable (${exe} ${cpp} ${ARGN} $ ) -# target_link_libraries(${exe} hip_hcc) + target_link_libraries(${exe} hip_hcc) else() add_executable (${exe} ${cpp} ${ARGN} $ ) endif()