Skip to content

Commit

Permalink
Only build simpleIPC on UNIX-like OSes
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalroz committed Apr 20, 2023
1 parent 3a35b8b commit c283152
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ endif()
add_executable(simpleDrvRuntimePTX modified_cuda_samples/simpleDrvRuntimePTX/simpleDrvRuntimePTX.cpp)
add_executable(inlinePTX modified_cuda_samples/inlinePTX/inlinePTX.cu)
add_executable(simpleStreams modified_cuda_samples/simpleStreams/simpleStreams.cu)
add_executable(simpleIPC modified_cuda_samples/simpleIPC/simpleIPC.cu)
if(UNIX)
set(simpleIPC_include_files unistd.h sched.h sys/mman.h sys/wait.h linux/version.h)
CHECK_INCLUDE_FILES("${simpleIPC_include_files}" have_simpleIPC_include_files LANGUAGE CXX)
if(have_simpleIPC_include_files)
add_executable(simpleIPC modified_cuda_samples/simpleIPC/simpleIPC.cu)
endif()
endif()
if ((NOT DEFINED CMAKE_CUDA_HOST_COMPILER) OR (CMAKE_CUDA_HOST_COMPILER STREQUAL ""))
set(CCBIN_ARGUMENT)
else()
Expand Down Expand Up @@ -113,8 +119,6 @@ if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL "11.0")
endif()
add_executable(bandwidthtest modified_cuda_samples/bandwidthtest/bandwidthtest.cpp)
#----
add_custom_target(modified_cuda_samples)
add_dependencies(modified_cuda_samples vectorAdd inlinePTX simpleStreams simpleIPC)

add_executable(version_management by_api_module/version_management.cpp)
add_executable(error_handling by_api_module/error_handling.cu)
Expand Down

0 comments on commit c283152

Please sign in to comment.