diff options
Diffstat (limited to 'Modules/Platform/Linux-NVHPC.cmake')
-rw-r--r-- | Modules/Platform/Linux-NVHPC.cmake | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Modules/Platform/Linux-NVHPC.cmake b/Modules/Platform/Linux-NVHPC.cmake index aad17f1..602b417 100644 --- a/Modules/Platform/Linux-NVHPC.cmake +++ b/Modules/Platform/Linux-NVHPC.cmake @@ -3,13 +3,15 @@ # This module is shared by multiple languages; use include blocker. -if(__LINUX_COMPILER_NVIDIA) - return() -endif() -set(__LINUX_COMPILER_NVIDIA 1) - -include(Platform/Linux-PGI) +include_guard() macro(__linux_compiler_nvhpc lang) - __linux_compiler_pgi(${lang}) + set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC") + set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE") + set(_CMAKE_${lang}_PIE_MAY_BE_SUPPORTED_BY_LINKER YES) + set(CMAKE_${lang}_LINK_OPTIONS_PIE "-fPIE") + set(CMAKE_${lang}_LINK_OPTIONS_NO_PIE "") + set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC") + set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared") + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "") endmacro() |