diff --git a/projects/hip-tests/catch/CMakeLists.txt b/projects/hip-tests/catch/CMakeLists.txt index 67f5673d30..db9c0552ce 100644 --- a/projects/hip-tests/catch/CMakeLists.txt +++ b/projects/hip-tests/catch/CMakeLists.txt @@ -1,4 +1,9 @@ cmake_minimum_required(VERSION 3.16.8) + +# to skip the simple compiler test +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_CXX_COMPILER_WORKS 1) + project(hiptests) # Check if platform and compiler are set @@ -32,8 +37,10 @@ else() # Set both compilers else windows cmake complains of mismatch cmake_path(SET CMAKE_CXX_COMPILER "${HIP_PATH}/bin/hipcc.bat") cmake_path(SET CMAKE_C_COMPILER "${HIP_PATH}/bin/hipcc.bat") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --rocm-path=${ROCM_PATH}") endif() + if(NOT DEFINED CATCH2_PATH) if(DEFINED ENV{CATCH2_PATH}) set(CATCH2_PATH $ENV{CATCH2_PATH} CACHE STRING "Catch2 Path") @@ -128,10 +135,9 @@ add_subdirectory(unit) add_subdirectory(ABM) add_subdirectory(hipTestMain) add_subdirectory(stress) - +add_subdirectory(TypeQualifiers) if(UNIX) add_subdirectory(multiproc) - add_subdirectory(TypeQualifiers) endif() cmake_policy(POP) diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux.json b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux.json new file mode 100644 index 0000000000..c11a1b823e --- /dev/null +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux.json @@ -0,0 +1,7 @@ +{ + "DisabledTests": + [ + "Unit_hipStreamPerThread_DeviceReset_1" + ] + +} diff --git a/projects/hip-tests/catch/multiproc/CMakeLists.txt b/projects/hip-tests/catch/multiproc/CMakeLists.txt index 78de21f674..8d690c6734 100644 --- a/projects/hip-tests/catch/multiproc/CMakeLists.txt +++ b/projects/hip-tests/catch/multiproc/CMakeLists.txt @@ -14,10 +14,8 @@ set(LINUX_TEST_SRC hipMemCoherencyTstMProc.cc ) -if(UNIX) - # the last argument linker libraries is required for this test but optional to the function - hip_add_exe_to_target(NAME MultiProc - TEST_SRC ${LINUX_TEST_SRC} - TEST_TARGET_NAME build_tests - LINKER_LIBS ${CMAKE_DL_LIBS}) -endif() +# the last argument linker libraries is required for this test but optional to the function +hip_add_exe_to_target(NAME MultiProc + TEST_SRC ${LINUX_TEST_SRC} + TEST_TARGET_NAME build_tests + LINKER_LIBS ${CMAKE_DL_LIBS}) diff --git a/projects/hip-tests/catch/unit/CMakeLists.txt b/projects/hip-tests/catch/unit/CMakeLists.txt index 0e8b37c993..ff8a0f95fe 100644 --- a/projects/hip-tests/catch/unit/CMakeLists.txt +++ b/projects/hip-tests/catch/unit/CMakeLists.txt @@ -21,7 +21,6 @@ add_subdirectory(memory) add_subdirectory(deviceLib) add_subdirectory(stream) -add_subdirectory(streamperthread) add_subdirectory(event) add_subdirectory(occupancy) add_subdirectory(device) @@ -29,6 +28,5 @@ add_subdirectory(rtc) add_subdirectory(printf) add_subdirectory(printfExe) add_subdirectory(texture) -if(UNIX) - add_subdirectory(graph) -endif() +add_subdirectory(streamperthread) +add_subdirectory(graph) diff --git a/projects/hip-tests/catch/unit/streamperthread/CMakeLists.txt b/projects/hip-tests/catch/unit/streamperthread/CMakeLists.txt index 51a789d426..a47e1e8c69 100644 --- a/projects/hip-tests/catch/unit/streamperthread/CMakeLists.txt +++ b/projects/hip-tests/catch/unit/streamperthread/CMakeLists.txt @@ -6,8 +6,6 @@ set(TEST_SRC hipStreamPerThread_DeviceReset.cc ) -# Create shared lib of all tests -add_library(StreamPerThreadTest SHARED EXCLUDE_FROM_ALL ${TEST_SRC}) - -# Add dependency on build_tests to build it on this custom target -add_dependencies(build_tests StreamPerThreadTest) +hip_add_exe_to_target(NAME StreamPerThreadTest + TEST_SRC ${TEST_SRC} + TEST_TARGET_NAME build_tests)