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.
This commit is contained in:
Brad King 2009-09-30 09:37:35 -04:00
parent f40406ed6b
commit 6d434ee6cc
13 changed files with 45 additions and 32 deletions

View File

@ -1 +1,9 @@
SET(CMAKE_C_VERBOSE_FLAG "-V") 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>")

View File

@ -1 +1,12 @@
SET(CMAKE_CXX_VERBOSE_FLAG "-V") 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>")

View File

@ -1,2 +1,7 @@
SET(CMAKE_Fortran_VERBOSE_FLAG "-V") SET(CMAKE_Fortran_VERBOSE_FLAG "-V")
SET(CMAKE_Fortran_DEFINE_FLAG "-WF,-D") 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")

View File

@ -0,0 +1 @@
include(Platform/AIX-XL-C)

View File

@ -0,0 +1 @@
include(Platform/AIX-XL-CXX)

View File

@ -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 " ")

View File

@ -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 " ")

View File

@ -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 " ")

View File

@ -18,44 +18,13 @@ SET_PROPERTY(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
# CXX Compiler # CXX Compiler
IF(CMAKE_COMPILER_IS_GNUCXX) IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-G") # -shared 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) ENDIF(CMAKE_COMPILER_IS_GNUCXX)
# C Compiler # C Compiler
IF(CMAKE_COMPILER_IS_GNUCC) IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-G") # -shared 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) 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. # 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 # 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: # static or shared, then we could add this back:

View File

@ -0,0 +1 @@
include(Platform/Darwin-XL-C)

View File

@ -0,0 +1 @@
include(Platform/Darwin-XL-CXX)

View File

@ -3,4 +3,3 @@ SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle")
# Enable shared library versioning. # Enable shared library versioning.
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-install_name") SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-install_name")
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-install_name")

View File

@ -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")