diff options
Diffstat (limited to 'Modules/Compiler/NVIDIA-CUDA.cmake')
-rw-r--r-- | Modules/Compiler/NVIDIA-CUDA.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake new file mode 100644 index 0000000..9fcd8d7 --- /dev/null +++ b/Modules/Compiler/NVIDIA-CUDA.cmake @@ -0,0 +1,16 @@ +set(CMAKE_CXX_VERBOSE_FLAG "-v") + + +set(CMAKE_CUDA_COMPILE_OPTIONS_PIE -Xcompiler=-fPIE) +set(CMAKE_CUDA_COMPILE_OPTIONS_PIC -Xcompiler=-fPIC) +set(CMAKE_SHARED_LIBRARY_CUDA_FLAGS -Xcompiler=-fPIC) +set(CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS -shared) +set(CMAKE_INCLUDE_SYSTEM_FLAG_CUDA -isystem=) +set(CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITY -Xcompiler=-fvisibility=) + +if (NOT CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 7.0) + set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=c++11") + set(CMAKE_CUDA11_STANDARD_COMPILE_OPTION "-std=c++11") + set(CMAKE_CUDA11_EXTENSION_COMPILE_OPTION "-std=c++11") +endif() |