mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2025-04-24 08:41:23 +01:00
21 lines
483 B
CMake
21 lines
483 B
CMake
# Include directories and libraries
|
|
include_directories(../../../Common)
|
|
|
|
find_package(OpenMP)
|
|
|
|
# Source file
|
|
set(SRC_FILES
|
|
cudaOpenMP.cu
|
|
)
|
|
|
|
if(OpenMP_CXX_FOUND)
|
|
# Add target for asyncAPI
|
|
add_executable(cudaOpenMP ${SRC_FILES})
|
|
set_target_properties(cudaOpenMP PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
|
target_link_libraries(cudaOpenMP PUBLIC
|
|
OpenMP::OpenMP_CXX
|
|
)
|
|
else()
|
|
message(STATUS "OpenMP not found - will not build sample 'cudaOpenMP'")
|
|
endif()
|