From 8d06d246b3c79103d89865e9b81b093bffa9d442 Mon Sep 17 00:00:00 2001 From: Jonathan Bentz Date: Thu, 19 Dec 2024 13:15:39 -0600 Subject: [PATCH] Updating for more linux guarding --- .../streamOrderedAllocationIPC/CMakeLists.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Samples/2_Concepts_and_Techniques/streamOrderedAllocationIPC/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/streamOrderedAllocationIPC/CMakeLists.txt index e39aba3d..4d147b83 100644 --- a/Samples/2_Concepts_and_Techniques/streamOrderedAllocationIPC/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/streamOrderedAllocationIPC/CMakeLists.txt @@ -14,16 +14,21 @@ endif() # Include directories and libraries include_directories(../../../Common) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") # Source file # Add target for streamOrderedAllocationIPC -add_executable(streamOrderedAllocationIPC streamOrderedAllocationIPC.cu ../../../Common/helper_multiprocess.cpp) + add_executable(streamOrderedAllocationIPC streamOrderedAllocationIPC.cu ../../../Common/helper_multiprocess.cpp) -target_compile_options(streamOrderedAllocationIPC PRIVATE $<$:--extended-lambda>) + target_compile_options(streamOrderedAllocationIPC PRIVATE $<$:--extended-lambda>) -target_compile_features(streamOrderedAllocationIPC PRIVATE cxx_std_17 cuda_std_17) + target_compile_features(streamOrderedAllocationIPC PRIVATE cxx_std_17 cuda_std_17) -set_target_properties(streamOrderedAllocationIPC PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + set_target_properties(streamOrderedAllocationIPC PROPERTIES CUDA_SEPARABLE_COMPILATION ON) -target_link_libraries(streamOrderedAllocationIPC PUBLIC - CUDA::cuda_driver + target_link_libraries(streamOrderedAllocationIPC PUBLIC + CUDA::cuda_driver ) +else() + message(STATUS "Will not build sample streamOrderedAllocationIPC - requires Linux OS") +endif() +