summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-09-30 13:37:35 (GMT)
committerBrad King <brad.king@kitware.com>2009-09-30 13:37:35 (GMT)
commit6d434ee6ccc250bfc653281643d70a3d1f8938cc (patch)
tree0b402bdcd66ed738b2e9f60fdd7774eb57ccaeb1
parentf40406ed6bbb47e2b68e20cb7dd623a7961b090b (diff)
downloadCMake-6d434ee6ccc250bfc653281643d70a3d1f8938cc.zip
CMake-6d434ee6ccc250bfc653281643d70a3d1f8938cc.tar.gz
CMake-6d434ee6ccc250bfc653281643d70a3d1f8938cc.tar.bz2
Split XL compiler information files
This moves platform-independent XL compiler flags into separate "Compiler/XL-<lang>.cmake" modules. Platform-specific flags go in "Platform/<os>-XL-<lang>.cmake" modules.
-rw-r--r--Modules/Compiler/XL-C.cmake8
-rw-r--r--Modules/Compiler/XL-CXX.cmake11
-rw-r--r--Modules/Compiler/XL-Fortran.cmake5
-rw-r--r--Modules/Platform/AIX-VisualAge-C.cmake1
-rw-r--r--Modules/Platform/AIX-VisualAge-CXX.cmake1
-rw-r--r--Modules/Platform/AIX-XL-C.cmake4
-rw-r--r--Modules/Platform/AIX-XL-CXX.cmake4
-rw-r--r--Modules/Platform/AIX-XL-Fortran.cmake4
-rw-r--r--Modules/Platform/AIX.cmake31
-rw-r--r--Modules/Platform/Darwin-VisualAge-C.cmake1
-rw-r--r--Modules/Platform/Darwin-VisualAge-CXX.cmake1
-rw-r--r--Modules/Platform/Darwin-XL-C.cmake (renamed from Modules/Platform/Darwin-xlc.cmake)1
-rw-r--r--Modules/Platform/Darwin-XL-CXX.cmake5
13 files changed, 45 insertions, 32 deletions
diff --git a/Modules/Compiler/XL-C.cmake b/Modules/Compiler/XL-C.cmake
index 3120478..cc4c7eb 100644
--- a/Modules/Compiler/XL-C.cmake
+++ b/Modules/Compiler/XL-C.cmake
@@ -1 +1,9 @@
SET(CMAKE_C_VERBOSE_FLAG "-V")
+
+SET(CMAKE_C_FLAGS_DEBUG_INIT "-g")
+SET(CMAKE_C_FLAGS_RELEASE_INIT "-O -DNDEBUG")
+SET(CMAKE_C_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
+SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g")
+
+SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+SET(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
diff --git a/Modules/Compiler/XL-CXX.cmake b/Modules/Compiler/XL-CXX.cmake
index 618ff5a..961cfee 100644
--- a/Modules/Compiler/XL-CXX.cmake
+++ b/Modules/Compiler/XL-CXX.cmake
@@ -1 +1,12 @@
SET(CMAKE_CXX_VERBOSE_FLAG "-V")
+
+SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
+SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-O -DNDEBUG")
+SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
+SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g")
+
+SET(CMAKE_CXX_COMPILE_OBJECT
+ "<CMAKE_CXX_COMPILER> -+ <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+
+SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+SET(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
diff --git a/Modules/Compiler/XL-Fortran.cmake b/Modules/Compiler/XL-Fortran.cmake
index 49d6bb2..6133f56 100644
--- a/Modules/Compiler/XL-Fortran.cmake
+++ b/Modules/Compiler/XL-Fortran.cmake
@@ -1,2 +1,7 @@
SET(CMAKE_Fortran_VERBOSE_FLAG "-V")
SET(CMAKE_Fortran_DEFINE_FLAG "-WF,-D")
+
+SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
+SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O")
+SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-O")
+SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g")
diff --git a/Modules/Platform/AIX-VisualAge-C.cmake b/Modules/Platform/AIX-VisualAge-C.cmake
new file mode 100644
index 0000000..67b3171
--- /dev/null
+++ b/Modules/Platform/AIX-VisualAge-C.cmake
@@ -0,0 +1 @@
+include(Platform/AIX-XL-C)
diff --git a/Modules/Platform/AIX-VisualAge-CXX.cmake b/Modules/Platform/AIX-VisualAge-CXX.cmake
new file mode 100644
index 0000000..7894d24
--- /dev/null
+++ b/Modules/Platform/AIX-VisualAge-CXX.cmake
@@ -0,0 +1 @@
+include(Platform/AIX-XL-CXX)
diff --git a/Modules/Platform/AIX-XL-C.cmake b/Modules/Platform/AIX-XL-C.cmake
new file mode 100644
index 0000000..2de30d5
--- /dev/null
+++ b/Modules/Platform/AIX-XL-C.cmake
@@ -0,0 +1,4 @@
+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 " ")
diff --git a/Modules/Platform/AIX-XL-CXX.cmake b/Modules/Platform/AIX-XL-CXX.cmake
new file mode 100644
index 0000000..648cb31
--- /dev/null
+++ b/Modules/Platform/AIX-XL-CXX.cmake
@@ -0,0 +1,4 @@
+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 " ")
diff --git a/Modules/Platform/AIX-XL-Fortran.cmake b/Modules/Platform/AIX-XL-Fortran.cmake
new file mode 100644
index 0000000..8292e78
--- /dev/null
+++ b/Modules/Platform/AIX-XL-Fortran.cmake
@@ -0,0 +1,4 @@
+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 " ")
diff --git a/Modules/Platform/AIX.cmake b/Modules/Platform/AIX.cmake
index 455586d..c8a33c3 100644
--- a/Modules/Platform/AIX.cmake
+++ b/Modules/Platform/AIX.cmake
@@ -18,44 +18,13 @@ SET_PROPERTY(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
# CXX Compiler
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-G") # -shared
-ELSE(CMAKE_COMPILER_IS_GNUCXX)
- 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 " ")
- SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
- SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
# C Compiler
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-G") # -shared
-ELSE(CMAKE_COMPILER_IS_GNUCC)
- 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 " ")
- SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
- SET (CMAKE_C_FLAGS_RELEASE_INIT "-O -DNDEBUG")
- SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
- SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
-IF(NOT CMAKE_COMPILER_IS_GNUCC)
- SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
- SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCC)
-
-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_CXX_COMPILE_OBJECT
- "<CMAKE_CXX_COMPILER> -+ <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
- SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
- SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
-
-
# since .a can be a static or shared library on AIX, we can not do this.
# at some point if we wanted it, we would have to figure out if a .a is
# static or shared, then we could add this back:
diff --git a/Modules/Platform/Darwin-VisualAge-C.cmake b/Modules/Platform/Darwin-VisualAge-C.cmake
new file mode 100644
index 0000000..859914f
--- /dev/null
+++ b/Modules/Platform/Darwin-VisualAge-C.cmake
@@ -0,0 +1 @@
+include(Platform/Darwin-XL-C)
diff --git a/Modules/Platform/Darwin-VisualAge-CXX.cmake b/Modules/Platform/Darwin-VisualAge-CXX.cmake
new file mode 100644
index 0000000..46c1005
--- /dev/null
+++ b/Modules/Platform/Darwin-VisualAge-CXX.cmake
@@ -0,0 +1 @@
+include(Platform/Darwin-XL-CXX)
diff --git a/Modules/Platform/Darwin-xlc.cmake b/Modules/Platform/Darwin-XL-C.cmake
index f7e4da3..934ebcc 100644
--- a/Modules/Platform/Darwin-xlc.cmake
+++ b/Modules/Platform/Darwin-XL-C.cmake
@@ -3,4 +3,3 @@ SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle")
# Enable shared library versioning.
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-install_name")
-SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-install_name")
diff --git a/Modules/Platform/Darwin-XL-CXX.cmake b/Modules/Platform/Darwin-XL-CXX.cmake
new file mode 100644
index 0000000..22ae018
--- /dev/null
+++ b/Modules/Platform/Darwin-XL-CXX.cmake
@@ -0,0 +1,5 @@
+SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-qmkshrobj")
+SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "-bundle")
+
+# Enable shared library versioning.
+SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-install_name")