From 6d434ee6ccc250bfc653281643d70a3d1f8938cc Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 30 Sep 2009 09:37:35 -0400 Subject: Split XL compiler information files This moves platform-independent XL compiler flags into separate "Compiler/XL-.cmake" modules. Platform-specific flags go in "Platform/-XL-.cmake" modules. --- Modules/Compiler/XL-C.cmake | 8 ++++++++ Modules/Compiler/XL-CXX.cmake | 11 ++++++++++ Modules/Compiler/XL-Fortran.cmake | 5 +++++ Modules/Platform/AIX-VisualAge-C.cmake | 1 + Modules/Platform/AIX-VisualAge-CXX.cmake | 1 + Modules/Platform/AIX-XL-C.cmake | 4 ++++ Modules/Platform/AIX-XL-CXX.cmake | 4 ++++ Modules/Platform/AIX-XL-Fortran.cmake | 4 ++++ Modules/Platform/AIX.cmake | 31 ----------------------------- Modules/Platform/Darwin-VisualAge-C.cmake | 1 + Modules/Platform/Darwin-VisualAge-CXX.cmake | 1 + Modules/Platform/Darwin-XL-C.cmake | 5 +++++ Modules/Platform/Darwin-XL-CXX.cmake | 5 +++++ Modules/Platform/Darwin-xlc.cmake | 6 ------ 14 files changed, 50 insertions(+), 37 deletions(-) create mode 100644 Modules/Platform/AIX-VisualAge-C.cmake create mode 100644 Modules/Platform/AIX-VisualAge-CXX.cmake create mode 100644 Modules/Platform/AIX-XL-C.cmake create mode 100644 Modules/Platform/AIX-XL-CXX.cmake create mode 100644 Modules/Platform/AIX-XL-Fortran.cmake create mode 100644 Modules/Platform/Darwin-VisualAge-C.cmake create mode 100644 Modules/Platform/Darwin-VisualAge-CXX.cmake create mode 100644 Modules/Platform/Darwin-XL-C.cmake create mode 100644 Modules/Platform/Darwin-XL-CXX.cmake delete mode 100644 Modules/Platform/Darwin-xlc.cmake 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 " -E > ") +SET(CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ") 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 + " -+ -o -c ") + +SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ") +SET(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -S -o ") 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 " -E > ") - SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ") -ENDIF(NOT CMAKE_COMPILER_IS_GNUCC) - -IF(NOT CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_CXX_COMPILE_OBJECT - " -+ -o -c ") - SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ") - SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -S -o ") -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-XL-C.cmake b/Modules/Platform/Darwin-XL-C.cmake new file mode 100644 index 0000000..934ebcc --- /dev/null +++ b/Modules/Platform/Darwin-XL-C.cmake @@ -0,0 +1,5 @@ +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj") +SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle") + +# Enable shared library versioning. +SET(CMAKE_SHARED_LIBRARY_SONAME_C_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") diff --git a/Modules/Platform/Darwin-xlc.cmake b/Modules/Platform/Darwin-xlc.cmake deleted file mode 100644 index f7e4da3..0000000 --- a/Modules/Platform/Darwin-xlc.cmake +++ /dev/null @@ -1,6 +0,0 @@ -SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj") -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") -- cgit v0.12