summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-11-22 13:43:13 (GMT)
committerBrad King <brad.king@kitware.com>2010-11-22 13:43:13 (GMT)
commiteda7841fd2de59b1dd05cccc5c4996276a2137d2 (patch)
treeb9baa08921f19b7f343136e7e648c03419d41b4f /Modules
parenta0739ac5ab0d1136d5d5bd7a87358e5eff1a8e3d (diff)
downloadCMake-eda7841fd2de59b1dd05cccc5c4996276a2137d2.zip
CMake-eda7841fd2de59b1dd05cccc5c4996276a2137d2.tar.gz
CMake-eda7841fd2de59b1dd05cccc5c4996276a2137d2.tar.bz2
Pass Mac linker flag through PGI compiler using "-Wl,"
The Mac linker defines -headerpad_max_install_names and the GCC front-end passes this flag through. The PGI compiler does not know about this flag, so we must use -Wl,-headerpad_max_install_names to pass it to the linker instead.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Darwin.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index db0642e..a99ff4a 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -33,8 +33,8 @@ SET(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
SET(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
SET(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
-SET(CMAKE_C_LINK_FLAGS "-headerpad_max_install_names")
-SET(CMAKE_CXX_LINK_FLAGS "-headerpad_max_install_names")
+SET(CMAKE_C_LINK_FLAGS "-Wl,-headerpad_max_install_names")
+SET(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names")
IF(HAVE_FLAG_SEARCH_PATHS_FIRST)
SET(CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
@@ -42,8 +42,8 @@ IF(HAVE_FLAG_SEARCH_PATHS_FIRST)
ENDIF(HAVE_FLAG_SEARCH_PATHS_FIRST)
SET(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names")
-SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names")
+SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
+SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names")
SET(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
SET(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")