mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2026-10-26 06:38:16 +08:00
adding code to Linux-only samples to guard against building on Windows
This commit is contained in:
@@ -14,16 +14,20 @@ endif()
|
||||
# Include directories and libraries
|
||||
include_directories(../../../Common)
|
||||
|
||||
# Source file
|
||||
# Add target for simpleCUFFT_callback
|
||||
add_executable(simpleCUFFT_callback simpleCUFFT_callback.cu)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# Source file
|
||||
# Add target for simpleCUFFT_callback
|
||||
add_executable(simpleCUFFT_callback simpleCUFFT_callback.cu)
|
||||
|
||||
target_compile_options(simpleCUFFT_callback PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
|
||||
target_compile_options(simpleCUFFT_callback PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
|
||||
|
||||
target_compile_features(simpleCUFFT_callback PRIVATE cxx_std_17 cuda_std_17)
|
||||
target_compile_features(simpleCUFFT_callback PRIVATE cxx_std_17 cuda_std_17)
|
||||
|
||||
set_target_properties(simpleCUFFT_callback PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
||||
set_target_properties(simpleCUFFT_callback PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
||||
|
||||
target_link_libraries(simpleCUFFT_callback PRIVATE
|
||||
CUDA::cufft
|
||||
)
|
||||
target_link_libraries(simpleCUFFT_callback PRIVATE
|
||||
CUDA::cufft
|
||||
)
|
||||
else()
|
||||
message(STATUS "Will not build sample simpleCUFFT_callback - requires Linux OS")
|
||||
endif()
|
||||
Reference in New Issue
Block a user