Imported Upstream version 3.25.0
[platform/upstream/cmake.git] / Modules / Platform / Linux-NVHPC.cmake
1 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2 # file Copyright.txt or https://cmake.org/licensing for details.
3
4
5 # This module is shared by multiple languages; use include blocker.
6 include_guard()
7
8 macro(__linux_compiler_nvhpc lang)
9   set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
10   set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
11   set(_CMAKE_${lang}_PIE_MAY_BE_SUPPORTED_BY_LINKER YES)
12   set(CMAKE_${lang}_LINK_OPTIONS_PIE "-fPIE")
13   set(CMAKE_${lang}_LINK_OPTIONS_NO_PIE "")
14   set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
15   set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
16   set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "")
17 endmacro()