summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-12-01 13:50:55 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-12-01 13:50:55 (GMT)
commit36588f7b162e74130ac2530f57acca263f1141ca (patch)
treea66a9d3c0a29328142c17c35c233174e2c768efc
parent5e36feebd4bcf4e7a6025a092fc257a33bbe6dc1 (diff)
parent571721c562786ee0996367b590693f82a643fbfb (diff)
downloadCMake-36588f7b162e74130ac2530f57acca263f1141ca.zip
CMake-36588f7b162e74130ac2530f57acca263f1141ca.tar.gz
CMake-36588f7b162e74130ac2530f57acca263f1141ca.tar.bz2
Merge topic 'pgi-macos-flags'
571721c5 PGI: Pass macOS-specific link flags directly to linker
-rw-r--r--Modules/Platform/Darwin-PGI-C.cmake2
-rw-r--r--Modules/Platform/Darwin-PGI-CXX.cmake2
-rw-r--r--Modules/Platform/Darwin-PGI-Fortran.cmake2
-rw-r--r--Modules/Platform/Darwin-PGI.cmake14
4 files changed, 20 insertions, 0 deletions
diff --git a/Modules/Platform/Darwin-PGI-C.cmake b/Modules/Platform/Darwin-PGI-C.cmake
new file mode 100644
index 0000000..790919b
--- /dev/null
+++ b/Modules/Platform/Darwin-PGI-C.cmake
@@ -0,0 +1,2 @@
+include(Platform/Darwin-PGI)
+__darwin_compiler_pgi(C)
diff --git a/Modules/Platform/Darwin-PGI-CXX.cmake b/Modules/Platform/Darwin-PGI-CXX.cmake
new file mode 100644
index 0000000..ceaed71
--- /dev/null
+++ b/Modules/Platform/Darwin-PGI-CXX.cmake
@@ -0,0 +1,2 @@
+include(Platform/Darwin-PGI)
+__darwin_compiler_pgi(CXX)
diff --git a/Modules/Platform/Darwin-PGI-Fortran.cmake b/Modules/Platform/Darwin-PGI-Fortran.cmake
new file mode 100644
index 0000000..146807b
--- /dev/null
+++ b/Modules/Platform/Darwin-PGI-Fortran.cmake
@@ -0,0 +1,2 @@
+include(Platform/Darwin-PGI)
+__darwin_compiler_pgi(Fortran)
diff --git a/Modules/Platform/Darwin-PGI.cmake b/Modules/Platform/Darwin-PGI.cmake
new file mode 100644
index 0000000..04479a8
--- /dev/null
+++ b/Modules/Platform/Darwin-PGI.cmake
@@ -0,0 +1,14 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+# This module is shared by multiple languages; use include blocker.
+if(__DARWIN_COMPILER_PGI)
+ return()
+endif()
+set(__DARWIN_COMPILER_PGI 1)
+
+macro(__darwin_compiler_pgi lang)
+ set(CMAKE_${lang}_OSX_COMPATIBILITY_VERSION_FLAG "-Wl,-compatibility_version,")
+ set(CMAKE_${lang}_OSX_CURRENT_VERSION_FLAG "-Wl,-current_version,")
+ set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,-install_name")
+endmacro()