diff options
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/HP-UX.cmake | 17 | ||||
-rw-r--r-- | Modules/Platform/IRIX.cmake | 16 | ||||
-rw-r--r-- | Modules/Platform/IRIX64.cmake | 16 | ||||
-rw-r--r-- | Modules/Platform/Windows-bcc32.cmake | 16 | ||||
-rw-r--r-- | Modules/Platform/Windows-cl.cmake | 16 | ||||
-rw-r--r-- | Modules/Platform/gcc.cmake | 17 |
6 files changed, 37 insertions, 61 deletions
diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake index 24f9441..6af9a1c 100644 --- a/Modules/Platform/HP-UX.cmake +++ b/Modules/Platform/HP-UX.cmake @@ -41,14 +41,11 @@ ELSE(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,+b") # -rpath SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic - IF(NOT CMAKE_CXX_FLAGS) - SET (CMAKE_CXX_FLAGS "") - SET (CMAKE_CXX_FLAGS_DEBUG "-g") - SET (CMAKE_CXX_FLAGS_MINSIZEREL "-O3") - SET (CMAKE_CXX_FLAGS_RELEASE "-O2") - SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g") - ENDIF(NOT CMAKE_CXX_FLAGS) - IF(NOT CMAKE_C_FLAGS) - SET (CMAKE_C_FLAGS "") - ENDIF(NOT CMAKE_C_FLAGS) + SET (CMAKE_CXX_FLAGS_INIT "") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g") + SET (CMAKE_C_FLAGS_INIT "") + ENDIF(CMAKE_COMPILER_IS_GNUCXX) diff --git a/Modules/Platform/IRIX.cmake b/Modules/Platform/IRIX.cmake index 2df5dad..8f78f02 100644 --- a/Modules/Platform/IRIX.cmake +++ b/Modules/Platform/IRIX.cmake @@ -6,16 +6,12 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP "") # : or empty IF(NOT CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_CXX_COMPILER> -ar -o <TARGET> <OBJECTS>") - IF(NOT CMAKE_CXX_FLAGS) - SET (CMAKE_CXX_FLAGS "") - SET (CMAKE_CXX_FLAGS_DEBUG "-g") - SET (CMAKE_CXX_FLAGS_MINSIZEREL "-O3") - SET (CMAKE_CXX_FLAGS_RELEASE "-O2") - SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2") - ENDIF(NOT CMAKE_CXX_FLAGS) - IF(NOT CMAKE_C_FLAGS) - SET (CMAKE_C_FLAGS "") - ENDIF(NOT CMAKE_C_FLAGS) + SET (CMAKE_CXX_FLAGS_INIT "") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3") + 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) diff --git a/Modules/Platform/IRIX64.cmake b/Modules/Platform/IRIX64.cmake index aa5f1b8..0caf9ab 100644 --- a/Modules/Platform/IRIX64.cmake +++ b/Modules/Platform/IRIX64.cmake @@ -7,16 +7,12 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_CXX_COMPILER> -ar -o <TARGET> <OBJECTS>") SET(CMAKE_ANSI_CXXFLAGS -LANG:std) - IF(NOT CMAKE_CXX_FLAGS) - SET (CMAKE_CXX_FLAGS "") - SET (CMAKE_CXX_FLAGS_DEBUG "-g") - SET (CMAKE_CXX_FLAGS_MINSIZEREL "-O3") - SET (CMAKE_CXX_FLAGS_RELEASE "-O2") - SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2") - ENDIF(NOT CMAKE_CXX_FLAGS) - IF(NOT CMAKE_C_FLAGS) - SET (CMAKE_C_FLAGS "") - ENDIF(NOT CMAKE_C_FLAGS) + SET (CMAKE_CXX_FLAGS_INIT "") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3") + 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) diff --git a/Modules/Platform/Windows-bcc32.cmake b/Modules/Platform/Windows-bcc32.cmake index 4d1b19d..b00ac1c 100644 --- a/Modules/Platform/Windows-bcc32.cmake +++ b/Modules/Platform/Windows-bcc32.cmake @@ -49,16 +49,12 @@ SET(CMAKE_CREATE_WIN32_EXE -tW -tWM ) # extra flags for a console app SET(CMAKE_CREATE_CONSOLE_EXE -tWC ) -IF(NOT CMAKE_CXX_FLAGS) - SET (CMAKE_CXX_FLAGS "-w- -whid -waus -wpar -tWM -P") - SET (CMAKE_CXX_FLAGS_DEBUG "-Od -v") - SET (CMAKE_CXX_FLAGS_MINSIZEREL "-O1") - SET (CMAKE_CXX_FLAGS_RELEASE "-O2") - SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Od") -ENDIF(NOT CMAKE_CXX_FLAGS) -IF(NOT CMAKE_C_FLAGS) - SET (CMAKE_C_FLAGS "-w- -whid -waus -tWM") -ENDIF(NOT CMAKE_C_FLAGS) +SET (CMAKE_CXX_FLAGS_INIT "-w- -whid -waus -wpar -tWM -P") +SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-Od -v") +SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O1") +SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2") +SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-Od") +SET (CMAKE_C_FLAGS_INIT "-w- -whid -waus -tWM") SET (CMAKE_STANDARD_LIBRARIES "import32.lib" CACHE STRING diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake index c1f975b..466632e 100644 --- a/Modules/Platform/Windows-cl.cmake +++ b/Modules/Platform/Windows-cl.cmake @@ -42,16 +42,12 @@ SET (CMAKE_BUILD_TYPE Debug CACHE STRING SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows) -IF(NOT CMAKE_CXX_FLAGS) - SET (CMAKE_CXX_FLAGS "/nologo /W3 /Zm1000 /GX /GR") - SET (CMAKE_CXX_FLAGS_DEBUG "/MDd /Zi /Od /GZ") - SET (CMAKE_CXX_FLAGS_MINSIZEREL "/MD /O1") - SET (CMAKE_CXX_FLAGS_RELEASE "/MD /O2") - SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /Zi /O2") -ENDIF(NOT CMAKE_CXX_FLAGS) -IF(NOT CMAKE_C_FLAGS) - SET (CMAKE_C_FLAGS "/nologo /W3 /Zm1000") -ENDIF(NOT CMAKE_C_FLAGS) +SET (CMAKE_CXX_FLAGS_INIT "/nologo /W3 /Zm1000 /GX /GR") +SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/MDd /Zi /Od /GZ") +SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1") +SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2") +SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2") +SET (CMAKE_C_FLAGS_INIT "/nologo /W3 /Zm1000") SET (CMAKE_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" CACHE STRING diff --git a/Modules/Platform/gcc.cmake b/Modules/Platform/gcc.cmake index c03b282..0029d2e 100644 --- a/Modules/Platform/gcc.cmake +++ b/Modules/Platform/gcc.cmake @@ -1,11 +1,6 @@ -IF(NOT CMAKE_CXX_FLAGS) - SET (CMAKE_CXX_FLAGS "") - SET (CMAKE_CXX_FLAGS_DEBUG "-g") - SET (CMAKE_CXX_FLAGS_MINSIZEREL "-O3") - SET (CMAKE_CXX_FLAGS_RELEASE "-O2") - SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") -ENDIF(NOT CMAKE_CXX_FLAGS) - -IF(NOT CMAKE_C_FLAGS) - SET (CMAKE_C_FLAGS "") -ENDIF(NOT CMAKE_C_FLAGS) +SET (CMAKE_CXX_FLAGS_INIT "") +SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") +SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3") +SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2") +SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") +SET (CMAKE_C_FLAGS_INIT "") |