summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-03-02 18:47:11 (GMT)
committerBrad King <brad.king@kitware.com>2011-03-02 18:47:11 (GMT)
commitc03b610c0aa20b298b15af401e1312c2b73beceb (patch)
treec3f785473d0ef406bed51493bb034b2893ff2c1e /Modules/Platform
parentc623008376a0758b1cb1b8f404d6a148ce938b8e (diff)
parentd30dcf18b9dedcf6744a87793653bc0d94d8a8bb (diff)
downloadCMake-c03b610c0aa20b298b15af401e1312c2b73beceb.zip
CMake-c03b610c0aa20b298b15af401e1312c2b73beceb.tar.gz
CMake-c03b610c0aa20b298b15af401e1312c2b73beceb.tar.bz2
Merge branch 'aix-xl-platform-info' into ReworkedAsmSupport
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/AIX-GNU.cmake2
-rw-r--r--Modules/Platform/AIX-XL-C.cmake6
-rw-r--r--Modules/Platform/AIX-XL-CXX.cmake6
-rw-r--r--Modules/Platform/AIX-XL-Fortran.cmake6
-rw-r--r--Modules/Platform/AIX-XL.cmake28
-rw-r--r--Modules/Platform/AIX.cmake2
-rw-r--r--Modules/Platform/Darwin.cmake3
-rw-r--r--Modules/Platform/Windows-GNU.cmake1
8 files changed, 39 insertions, 15 deletions
diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake
index 79c06ba..543f3e8 100644
--- a/Modules/Platform/AIX-GNU.cmake
+++ b/Modules/Platform/AIX-GNU.cmake
@@ -19,5 +19,7 @@ endif()
set(__AIX_COMPILER_GNU 1)
macro(__aix_compiler_gnu lang)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:")
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-G")
endmacro()
diff --git a/Modules/Platform/AIX-XL-C.cmake b/Modules/Platform/AIX-XL-C.cmake
index 2de30d5..5e437fa 100644
--- a/Modules/Platform/AIX-XL-C.cmake
+++ b/Modules/Platform/AIX-XL-C.cmake
@@ -1,4 +1,2 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS " ")
-SET(CMAKE_SHARED_MODULE_C_FLAGS " ")
+include(Platform/AIX-XL)
+__aix_compiler_xl(C)
diff --git a/Modules/Platform/AIX-XL-CXX.cmake b/Modules/Platform/AIX-XL-CXX.cmake
index 648cb31..ef38a5f 100644
--- a/Modules/Platform/AIX-XL-CXX.cmake
+++ b/Modules/Platform/AIX-XL-CXX.cmake
@@ -1,4 +1,2 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS " ")
-SET(CMAKE_SHARED_MODULE_CXX_FLAGS " ")
+include(Platform/AIX-XL)
+__aix_compiler_xl(CXX)
diff --git a/Modules/Platform/AIX-XL-Fortran.cmake b/Modules/Platform/AIX-XL-Fortran.cmake
index 8292e78..6d4f655 100644
--- a/Modules/Platform/AIX-XL-Fortran.cmake
+++ b/Modules/Platform/AIX-XL-Fortran.cmake
@@ -1,4 +1,2 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS " ")
-SET(CMAKE_SHARED_MODULE_Fortran_FLAGS " ")
+include(Platform/AIX-XL)
+__aix_compiler_xl(Fortran)
diff --git a/Modules/Platform/AIX-XL.cmake b/Modules/Platform/AIX-XL.cmake
new file mode 100644
index 0000000..1f94152
--- /dev/null
+++ b/Modules/Platform/AIX-XL.cmake
@@ -0,0 +1,28 @@
+
+#=============================================================================
+# Copyright 2002-2011 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# This module is shared by multiple languages; use include blocker.
+if(__AIX_COMPILER_XL)
+ return()
+endif()
+set(__AIX_COMPILER_XL 1)
+
+macro(__aix_compiler_xl lang)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:")
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
+ set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
+ set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
+ set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS " ")
+ set(CMAKE_SHARED_MODULE_${lang}_FLAGS " ")
+endmacro()
diff --git a/Modules/Platform/AIX.cmake b/Modules/Platform/AIX.cmake
index 0ab0cce..a9f773e 100644
--- a/Modules/Platform/AIX.cmake
+++ b/Modules/Platform/AIX.cmake
@@ -9,8 +9,6 @@ SET(CMAKE_DL_LIBS "-lld")
# When our own RPATH is to be added it may be inserted before the
# "always" paths.
SET(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib /lib)
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-blibpath:")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
# Files named "libfoo.a" may actually be shared libraries.
SET_PROPERTY(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index a99ff4a..c11c8fb 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -68,7 +68,8 @@ IF(NOT _CMAKE_OSX_SDKS)
FIND_PROGRAM(CMAKE_XCODE_SELECT xcode-select)
IF(CMAKE_XCODE_SELECT)
EXECUTE_PROCESS(COMMAND ${CMAKE_XCODE_SELECT} "-print-path"
- OUTPUT_VARIABLE OSX_DEVELOPER_ROOT)
+ OUTPUT_VARIABLE OSX_DEVELOPER_ROOT
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
FILE(GLOB _CMAKE_OSX_SDKS "${OSX_DEVELOPER_ROOT}/SDKs/*")
ENDIF(CMAKE_XCODE_SELECT)
ENDIF(NOT _CMAKE_OSX_SDKS)
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index 7084b83..72b5d62 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -43,6 +43,7 @@ endif()
set(CMAKE_DL_LIBS "")
set(CMAKE_LIBRARY_PATH_FLAG "-L")
set(CMAKE_LINK_LIBRARY_FLAG "-l")
+set(CMAKE_LINK_DEF_FILE_FLAG "") # Empty string: passing the file is enough
set(CMAKE_LINK_LIBRARY_SUFFIX "")
set(CMAKE_CREATE_WIN32_EXE "-mwindows")