diff --git a/catch/CMakeLists.txt b/catch/CMakeLists.txt index 8f7aa9262..1659cda20 100644 --- a/catch/CMakeLists.txt +++ b/catch/CMakeLists.txt @@ -141,8 +141,9 @@ if (WIN32) # When args to linker exceeds max chars. # msbuild writes args to a rsp file. # This is used to reference the obj file correctly - SET(CMAKE_C_RESPONSE_FILE_LINK_FLAG "") - SET(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "") + SET(CMAKE_C_RESPONSE_FILE_LINK_FLAG "@") + SET(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@") + SET(CMAKE_NINJA_FORCE_RESPONSE_FILE TRUE CACHE INTERNAL "") endif() if(HIP_PLATFORM STREQUAL "amd") diff --git a/catch/unit/graph/CMakeLists.txt b/catch/unit/graph/CMakeLists.txt index a47bb0038..a139b6b35 100644 --- a/catch/unit/graph/CMakeLists.txt +++ b/catch/unit/graph/CMakeLists.txt @@ -69,20 +69,7 @@ set(TEST_SRC hipStreamBeginCapture.cc hipStreamBeginCapture_old.cc hipStreamIsCapturing.cc - hipStreamIsCapturing_old.cc) - -if(HIP_PLATFORM MATCHES "amd") - set(AMD_SRC - hipStreamCaptureExtModuleLaunchKernel.cc - ) - set(TEST_SRC ${TEST_SRC} ${AMD_SRC}) -endif() - -hip_add_exe_to_target(NAME GraphsTest1 - TEST_SRC ${TEST_SRC} - TEST_TARGET_NAME build_tests) - -set(TEST_SRC + hipStreamIsCapturing_old.cc hipStreamGetCaptureInfo.cc hipStreamGetCaptureInfo_old.cc hipStreamEndCapture.cc @@ -131,9 +118,15 @@ set(TEST_SRC hipGraphKernelNodeGetAttribute.cc hipGraphKernelNodeSetAttribute.cc) +if(HIP_PLATFORM MATCHES "amd") + set(AMD_SRC + hipStreamCaptureExtModuleLaunchKernel.cc) + set(TEST_SRC ${TEST_SRC} ${AMD_SRC}) +endif() + add_custom_target(add_Kernel.code COMMAND ${CMAKE_CXX_COMPILER} --genco ${OFFLOAD_ARCH_STR} ${CMAKE_CURRENT_SOURCE_DIR}/add_Kernel.cpp -o ${CMAKE_CURRENT_BINARY_DIR}/../graph/add_Kernel.code -I${CMAKE_CURRENT_SOURCE_DIR}/../../../../include/ -I${CMAKE_CURRENT_SOURCE_DIR}/../../include --rocm-path=${ROCM_PATH}) -hip_add_exe_to_target(NAME GraphsTest2 +hip_add_exe_to_target(NAME GraphsTest TEST_SRC ${TEST_SRC} TEST_TARGET_NAME build_tests) diff --git a/catch/unit/memory/CMakeLists.txt b/catch/unit/memory/CMakeLists.txt index fa340863a..412204d78 100644 --- a/catch/unit/memory/CMakeLists.txt +++ b/catch/unit/memory/CMakeLists.txt @@ -68,32 +68,7 @@ set(TEST_SRC hipMemAdviseMmap.cc hipMallocManaged.cc hipMemRangeGetAttribute.cc - hipMemRangeGetAttribute_old.cc) - -if(HIP_PLATFORM MATCHES "amd") - set(TEST_SRC - ${TEST_SRC} - hipMemPtrGetInfo.cc - hipPointerGetAttributes.cc - hipMemCoherencyTst.cc - hipExtMallocWithFlags.cc - hipMallocMngdMultiThread.cc - hipArray.cc - hipMemVmm.cc) -else() - set(TEST_SRC ${TEST_SRC} hipGetSymbolSizeAddress.cc) -endif() - -hip_add_exe_to_target(NAME MemoryTest1 - TEST_SRC ${TEST_SRC} - TEST_TARGET_NAME build_tests COMMON_SHARED_SRC ${COMMON_SHARED_SRC}) - -if(HIP_PLATFORM MATCHES "amd") - set_source_files_properties(hipHostRegister.cc PROPERTIES COMPILE_FLAGS -std=c++17) - add_executable(hipHostRegisterPerf EXCLUDE_FROM_ALL hipHostRegister_exe.cc) -endif() - -set(TEST_SRC + hipMemRangeGetAttribute_old.cc hipMemcpyFromSymbol.cc hipPtrGetAttribute.cc hipMemPoolApi.cc @@ -144,6 +119,25 @@ set(TEST_SRC hipMemRangeGetAttributes_old.cc hipMemGetAddressRange.cc) -hip_add_exe_to_target(NAME MemoryTest2 +if(HIP_PLATFORM MATCHES "amd") + set(TEST_SRC + ${TEST_SRC} + hipMemPtrGetInfo.cc + hipPointerGetAttributes.cc + hipMemCoherencyTst.cc + hipExtMallocWithFlags.cc + hipMallocMngdMultiThread.cc + hipArray.cc + hipMemVmm.cc) +else() + set(TEST_SRC ${TEST_SRC} hipGetSymbolSizeAddress.cc) +endif() + +hip_add_exe_to_target(NAME MemoryTest TEST_SRC ${TEST_SRC} TEST_TARGET_NAME build_tests COMMON_SHARED_SRC ${COMMON_SHARED_SRC}) + +if(HIP_PLATFORM MATCHES "amd") + set_source_files_properties(hipHostRegister.cc PROPERTIES COMPILE_FLAGS -std=c++17) + add_executable(hipHostRegisterPerf EXCLUDE_FROM_ALL hipHostRegister_exe.cc) +endif()