diff --git a/projects/hip-tests/catch/CMakeLists.txt b/projects/hip-tests/catch/CMakeLists.txt index baca620efb..597f4ae5ff 100644 --- a/projects/hip-tests/catch/CMakeLists.txt +++ b/projects/hip-tests/catch/CMakeLists.txt @@ -290,10 +290,7 @@ add_subdirectory(kernels ${CATCH_BUILD_DIR}/kernels) add_subdirectory(hipTestMain ${CATCH_BUILD_DIR}/hipTestMain) add_subdirectory(stress ${CATCH_BUILD_DIR}/stress) add_subdirectory(TypeQualifiers ${CATCH_BUILD_DIR}/TypeQualifiers) -add_subdirectory(perftests ${CATCH_BUILD_DIR}/perftests) -if(UNIX) - add_subdirectory(multiproc ${CATCH_BUILD_DIR}/multiproc) -endif() +add_subdirectory(multiproc ${CATCH_BUILD_DIR}/multiproc) add_subdirectory(performance ${CATCH_BUILD_DIR}/performance) cmake_policy(POP) diff --git a/projects/hip-tests/catch/multiproc/CMakeLists.txt b/projects/hip-tests/catch/multiproc/CMakeLists.txt index 0f4642e436..033b616d68 100644 --- a/projects/hip-tests/catch/multiproc/CMakeLists.txt +++ b/projects/hip-tests/catch/multiproc/CMakeLists.txt @@ -17,7 +17,9 @@ set(TEST_SRC hipMemGetInfoMProc.cc ) -add_custom_target(dummy_kernel.code COMMAND ${CMAKE_CXX_COMPILER} --genco ${CMAKE_CURRENT_SOURCE_DIR}/dummy_kernel.cpp -o ${CMAKE_CURRENT_BINARY_DIR}/../multiproc/dummy_kernel.code -I${CMAKE_CURRENT_SOURCE_DIR}/../../../../include/ -I${CMAKE_CURRENT_SOURCE_DIR}/../../include) +if(UNIX) + add_custom_target(dummy_kernel.code COMMAND ${CMAKE_CXX_COMPILER} --genco ${CMAKE_CURRENT_SOURCE_DIR}/dummy_kernel.cpp -o ${CMAKE_CURRENT_BINARY_DIR}/../multiproc/dummy_kernel.code -I${CMAKE_CURRENT_SOURCE_DIR}/../../../../include/ -I${CMAKE_CURRENT_SOURCE_DIR}/../../include) +endif() # the last argument linker libraries is required for this test but optional to the function if(HIP_PLATFORM MATCHES "nvidia") @@ -31,5 +33,8 @@ hip_add_exe_to_target(NAME MultiProc TEST_TARGET_NAME build_tests LINKER_LIBS hiprtc) endif() -add_dependencies(build_tests dummy_kernel.code) + +if(UNIX) + add_dependencies(build_tests dummy_kernel.code) +endif() diff --git a/projects/hip-tests/catch/multiproc/childMalloc.cc b/projects/hip-tests/catch/multiproc/childMalloc.cc index 858fd0878e..c8f30c829a 100644 --- a/projects/hip-tests/catch/multiproc/childMalloc.cc +++ b/projects/hip-tests/catch/multiproc/childMalloc.cc @@ -7,8 +7,6 @@ #include #include #include -#endif - bool testMallocFromChild() { int fd[2]; @@ -60,3 +58,5 @@ TEST_CASE("ChildMalloc") { auto res = testMallocFromChild(); REQUIRE(res == true); } + +#endif diff --git a/projects/hip-tests/catch/multiproc/deviceAllocationMproc.cc b/projects/hip-tests/catch/multiproc/deviceAllocationMproc.cc index c1c15eb5cd..eccbb76094 100644 --- a/projects/hip-tests/catch/multiproc/deviceAllocationMproc.cc +++ b/projects/hip-tests/catch/multiproc/deviceAllocationMproc.cc @@ -26,7 +26,6 @@ THE SOFTWARE. #include #include #include -#endif #define SIZE 2097152 // GPU threads @@ -317,3 +316,5 @@ TEST_CASE("Unit_deviceAllocation_NewDelete_MultProcess") { auto res = testDeviceMemMulProc(false); REQUIRE(res == true); } + +#endif diff --git a/projects/hip-tests/catch/multiproc/hipMemCoherencyTstMProc.cc b/projects/hip-tests/catch/multiproc/hipMemCoherencyTstMProc.cc index 8eacc288cf..c80068ca36 100644 --- a/projects/hip-tests/catch/multiproc/hipMemCoherencyTstMProc.cc +++ b/projects/hip-tests/catch/multiproc/hipMemCoherencyTstMProc.cc @@ -32,6 +32,7 @@ exhibits fine grain behavior when HIP_HOST_COHERENT is set to 1 */ +#ifdef __linux__ #include #include #include @@ -582,3 +583,4 @@ TEST_CASE("Unit_hipHostMalloc_WthEnv1Flg3") { } } #endif +#endif