diff options
-rw-r--r-- | Modules/Platform/HP-UX.cmake | 15 | ||||
-rw-r--r-- | Modules/Platform/IRIX.cmake | 14 | ||||
-rw-r--r-- | Modules/Platform/IRIX64.cmake | 14 | ||||
-rw-r--r-- | Modules/Platform/Windows-bcc32.cmake | 15 | ||||
-rw-r--r-- | Modules/Platform/Windows-cl.cmake | 15 | ||||
-rw-r--r-- | Modules/Platform/gcc.cmake | 14 |
6 files changed, 50 insertions, 37 deletions
diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake index ebc370a..14f22b3 100644 --- a/Modules/Platform/HP-UX.cmake +++ b/Modules/Platform/HP-UX.cmake @@ -41,11 +41,12 @@ ELSE(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,+b") # -rpath SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic - 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") - SET (CMAKE_C_FLAGS "") - + 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") + SET (CMAKE_C_FLAGS "") + ENDIF(NOT CMAKE_CXX_FLAGS) ENDIF(CMAKE_COMPILER_IS_GNUCXX) diff --git a/Modules/Platform/IRIX.cmake b/Modules/Platform/IRIX.cmake index 8c720ab..9117a74 100644 --- a/Modules/Platform/IRIX.cmake +++ b/Modules/Platform/IRIX.cmake @@ -6,12 +6,14 @@ 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>") - 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") - SET (CMAKE_C_FLAGS "") + 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") + SET (CMAKE_C_FLAGS "") + ENDIF(NOT CMAKE_CXX_FLAGS) 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 eed0e2a..32654ae 100644 --- a/Modules/Platform/IRIX64.cmake +++ b/Modules/Platform/IRIX64.cmake @@ -7,12 +7,14 @@ 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) - 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") - SET (CMAKE_C_FLAGS "") + 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") + SET (CMAKE_C_FLAGS "") + ENDIF(NOT CMAKE_CXX_FLAGS) 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 4b2028f..aacbec5 100644 --- a/Modules/Platform/Windows-bcc32.cmake +++ b/Modules/Platform/Windows-bcc32.cmake @@ -49,12 +49,15 @@ SET(CMAKE_CREATE_WIN32_EXE -tW -tWM ) # extra flags for a console app SET(CMAKE_CREATE_CONSOLE_EXE -tWC ) -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") -SET (CMAKE_C_FLAGS "-w- -whid -waus -tWM") +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") + SET (CMAKE_C_FLAGS "-w- -whid -waus -tWM") +ENDIF(NOT CMAKE_CXX_FLAGS) + SET (CMAKE_STANDARD_LIBRARIES "import32.lib" CACHE STRING "Libraries linked by defalut with all applications.") diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake index 0881bf4..ea33cb5 100644 --- a/Modules/Platform/Windows-cl.cmake +++ b/Modules/Platform/Windows-cl.cmake @@ -42,12 +42,15 @@ SET (CMAKE_BUILD_TYPE Debug CACHE STRING SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows) -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") -SET (CMAKE_C_FLAGS "/nologo /W3 /Zm1000") +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") + SET (CMAKE_C_FLAGS "/nologo /W3 /Zm1000") +ENDIF(NOT CMAKE_CXX_FLAGS) + 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 "Libraries linked by defalut with all applications.") diff --git a/Modules/Platform/gcc.cmake b/Modules/Platform/gcc.cmake index 62b3c2e..54ad33a 100644 --- a/Modules/Platform/gcc.cmake +++ b/Modules/Platform/gcc.cmake @@ -1,6 +1,8 @@ -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") -SET (CMAKE_C_FLAGS "") +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") + SET (CMAKE_C_FLAGS "") +ENDIF(NOT CMAKE_CXX_FLAGS) |