diff options
-rw-r--r-- | Modules/Platform/AIX.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/BSDOS.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/Darwin.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/FreeBSD.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/HP-UX.cmake | 3 | ||||
-rw-r--r-- | Modules/Platform/IRIX.cmake | 5 | ||||
-rw-r--r-- | Modules/Platform/IRIX64.cmake | 5 | ||||
-rw-r--r-- | Modules/Platform/MP-RAS.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/NetBSD.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/OSF1.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/OpenBSD.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/RISCos.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/SCO_SV.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/SINIX.cmake | 5 | ||||
-rw-r--r-- | Modules/Platform/SunOS.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/True64.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/ULTRIX.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/UNIX_SV.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/UnixWare.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/Windows-gcc.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/Xenix.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/gcc.cmake | 26 |
22 files changed, 59 insertions, 17 deletions
diff --git a/Modules/Platform/AIX.cmake b/Modules/Platform/AIX.cmake index 7f17c83..7dffcde 100644 --- a/Modules/Platform/AIX.cmake +++ b/Modules/Platform/AIX.cmake @@ -9,3 +9,4 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX) IF(CMAKE_COMPILER_IS_GNUCC) SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-G") # -shared ENDIF(CMAKE_COMPILER_IS_GNUCC) +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/BSDOS.cmake b/Modules/Platform/BSDOS.cmake index e69de29..7d4d0c8 100644 --- a/Modules/Platform/BSDOS.cmake +++ b/Modules/Platform/BSDOS.cmake @@ -0,0 +1 @@ +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index a04cb05..8c8dc3a 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -23,3 +23,5 @@ SET(CMAKE_CXX_CREATE_SHARED_MODULE SET(CMAKE_C_CREATE_SHARED_MODULE "<CMAKE_C_COMPILER> <CMAKE_SHARED_MODULE_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") + +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/FreeBSD.cmake b/Modules/Platform/FreeBSD.cmake index e9c9ab2..e5a8093 100644 --- a/Modules/Platform/FreeBSD.cmake +++ b/Modules/Platform/FreeBSD.cmake @@ -6,3 +6,5 @@ IF(EXISTS /usr/include/dlfcn.h) SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-rpath,") # -rpath SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") # : or empty ENDIF(EXISTS /usr/include/dlfcn.h) +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake index b4e7506..b1445d3 100644 --- a/Modules/Platform/HP-UX.cmake +++ b/Modules/Platform/HP-UX.cmake @@ -26,7 +26,6 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC) # CXX compiler IF(CMAKE_COMPILER_IS_GNUCXX) - INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) # for gnu C++ SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-E -Wl,-b") # -shared @@ -47,3 +46,5 @@ ELSE(CMAKE_COMPILER_IS_GNUCXX) SET (CMAKE_C_FLAGS_INIT "") ENDIF(CMAKE_COMPILER_IS_GNUCXX) +# set flags for gcc support +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/IRIX.cmake b/Modules/Platform/IRIX.cmake index 8f78f02..7aa659d 100644 --- a/Modules/Platform/IRIX.cmake +++ b/Modules/Platform/IRIX.cmake @@ -12,7 +12,6 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX) SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2") SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2") SET (CMAKE_C_FLAGS_INIT "") -ELSE(NOT CMAKE_COMPILER_IS_GNUCXX) - INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX) - +# set flags for gcc support +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/IRIX64.cmake b/Modules/Platform/IRIX64.cmake index d4d9463..b2ce41a 100644 --- a/Modules/Platform/IRIX64.cmake +++ b/Modules/Platform/IRIX64.cmake @@ -38,6 +38,7 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX) SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3") SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2") SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2") -ELSE(NOT CMAKE_COMPILER_IS_GNUCXX) - INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX) + +# set up for gcc if the compiler is gcc +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/MP-RAS.cmake b/Modules/Platform/MP-RAS.cmake index 5a644dc..b52fe12 100644 --- a/Modules/Platform/MP-RAS.cmake +++ b/Modules/Platform/MP-RAS.cmake @@ -7,3 +7,5 @@ ENDIF(CMAKE_SYSTEM MATCHES "MP-RAS-02*.") +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/NetBSD.cmake b/Modules/Platform/NetBSD.cmake index e9c9ab2..e5a8093 100644 --- a/Modules/Platform/NetBSD.cmake +++ b/Modules/Platform/NetBSD.cmake @@ -6,3 +6,5 @@ IF(EXISTS /usr/include/dlfcn.h) SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-rpath,") # -rpath SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") # : or empty ENDIF(EXISTS /usr/include/dlfcn.h) +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/OSF1.cmake b/Modules/Platform/OSF1.cmake index 0abf87f..5249f60 100644 --- a/Modules/Platform/OSF1.cmake +++ b/Modules/Platform/OSF1.cmake @@ -26,3 +26,5 @@ IF(CMAKE_SYSTEM MATCHES "OSF1-V.*") SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*") +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/OpenBSD.cmake b/Modules/Platform/OpenBSD.cmake index e69de29..63ffb93 100644 --- a/Modules/Platform/OpenBSD.cmake +++ b/Modules/Platform/OpenBSD.cmake @@ -0,0 +1,2 @@ +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/RISCos.cmake b/Modules/Platform/RISCos.cmake index 1979d5e..5622827 100644 --- a/Modules/Platform/RISCos.cmake +++ b/Modules/Platform/RISCos.cmake @@ -2,3 +2,5 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0") SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o") SET(CMAKE_DL_LIBS "") SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-D,08000000") +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/SCO_SV.cmake b/Modules/Platform/SCO_SV.cmake index 89dcd56..929b04d 100644 --- a/Modules/Platform/SCO_SV.cmake +++ b/Modules/Platform/SCO_SV.cmake @@ -2,3 +2,5 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-Kpic -belf") SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-Kpic -belf") SET(CMAKE_DL_LIBS "") SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-belf -Wl,-Bexport") +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/SINIX.cmake b/Modules/Platform/SINIX.cmake index 134d78b..5542709 100644 --- a/Modules/Platform/SINIX.cmake +++ b/Modules/Platform/SINIX.cmake @@ -1 +1,4 @@ - SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC") +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC") +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) + diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake index 91c0e00..9a5b334 100644 --- a/Modules/Platform/SunOS.cmake +++ b/Modules/Platform/SunOS.cmake @@ -40,3 +40,5 @@ ELSE(CMAKE_COMPILER_IS_GNUCXX) "<CMAKE_CXX_COMPILER> -xar -o <TARGET> <OBJECTS> " "<CMAKE_RANLIB> <TARGET> ") ENDIF(CMAKE_COMPILER_IS_GNUCXX) +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/True64.cmake b/Modules/Platform/True64.cmake index e69de29..63ffb93 100644 --- a/Modules/Platform/True64.cmake +++ b/Modules/Platform/True64.cmake @@ -0,0 +1,2 @@ +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/ULTRIX.cmake b/Modules/Platform/ULTRIX.cmake index 4064721..5d425fc 100644 --- a/Modules/Platform/ULTRIX.cmake +++ b/Modules/Platform/ULTRIX.cmake @@ -2,3 +2,5 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0") SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o") SET(CMAKE_DL_LIBS "") SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-D,08000000") +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/UNIX_SV.cmake b/Modules/Platform/UNIX_SV.cmake index 62b0e59..14e0689 100644 --- a/Modules/Platform/UNIX_SV.cmake +++ b/Modules/Platform/UNIX_SV.cmake @@ -1,2 +1,4 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC") SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-Bexport") +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
\ No newline at end of file diff --git a/Modules/Platform/UnixWare.cmake b/Modules/Platform/UnixWare.cmake index 80acb87..a471bcb 100644 --- a/Modules/Platform/UnixWare.cmake +++ b/Modules/Platform/UnixWare.cmake @@ -1,2 +1,4 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC") SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-Wl,-Bexport") +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
\ No newline at end of file diff --git a/Modules/Platform/Windows-gcc.cmake b/Modules/Platform/Windows-gcc.cmake index a5a42f7..a927a77 100644 --- a/Modules/Platform/Windows-gcc.cmake +++ b/Modules/Platform/Windows-gcc.cmake @@ -12,3 +12,5 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP "") # : or empty SET(CMAKE_LIBRARY_PATH_FLAG "-L") SET(CMAKE_LINK_LIBRARY_FLAG "-l") +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
\ No newline at end of file diff --git a/Modules/Platform/Xenix.cmake b/Modules/Platform/Xenix.cmake index e69de29..63ffb93 100644 --- a/Modules/Platform/Xenix.cmake +++ b/Modules/Platform/Xenix.cmake @@ -0,0 +1,2 @@ +# include the gcc flags +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) diff --git a/Modules/Platform/gcc.cmake b/Modules/Platform/gcc.cmake index 1058a42..9d289d1 100644 --- a/Modules/Platform/gcc.cmake +++ b/Modules/Platform/gcc.cmake @@ -1,10 +1,16 @@ -SET (CMAKE_CXX_FLAGS_INIT "") -SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") -SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os") -SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3") -SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") -SET (CMAKE_C_FLAGS_INIT "") -SET (CMAKE_C_FLAGS_DEBUG_INIT "-g") -SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os") -SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3") -SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") +IF(CMAKE_COMPILER_IS_GNUCC) + SET (CMAKE_C_FLAGS_INIT "") + SET (CMAKE_C_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os") + SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3") + SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") +ENDIF(CMAKE_COMPILER_IS_GNUCC) + +IF(CMAKE_COMPILER_IS_GNUCXX) + SET (CMAKE_CXX_FLAGS_INIT "") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") +ENDIF(CMAKE_COMPILER_IS_GNUCXX) + |