diff options
author | Brad King <brad.king@kitware.com> | 2022-08-16 17:01:22 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-08-16 17:01:31 (GMT) |
commit | 4a82938d60331f02c2f495ab24c05515099b0a58 (patch) | |
tree | 31e1c1cf3e6ce89a569786abe6e2b752551ce986 /Modules/Platform | |
parent | 47a2eb8fac01b6f073de68ad5b960b61f86f9476 (diff) | |
parent | 52dc49deb955bf4b4805354ea270eff6ecd9e198 (diff) | |
download | CMake-4a82938d60331f02c2f495ab24c05515099b0a58.zip CMake-4a82938d60331f02c2f495ab24c05515099b0a58.tar.gz CMake-4a82938d60331f02c2f495ab24c05515099b0a58.tar.bz2 |
Merge topic 'nvhpc_fpie_support'
52dc49deb9 NVHPC: Enable PIE support on linux
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7564
Diffstat (limited to 'Modules/Platform')
-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() |