summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-11-22 16:44:07 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-11-22 16:44:07 (GMT)
commit066d5259c0a65bb43356f5c1612fc1928843164c (patch)
tree728a83fc0ef4253a5f1154973d838d7046ad01dd
parented72b56512e4681c4951a2510be6b6e769ed024f (diff)
downloadCMake-066d5259c0a65bb43356f5c1612fc1928843164c.zip
CMake-066d5259c0a65bb43356f5c1612fc1928843164c.tar.gz
CMake-066d5259c0a65bb43356f5c1612fc1928843164c.tar.bz2
ENH: more compiler flags
-rw-r--r--Modules/Platform/Linux-icpc.cmake12
-rw-r--r--Modules/Platform/SunOS.cmake12
2 files changed, 24 insertions, 0 deletions
diff --git a/Modules/Platform/Linux-icpc.cmake b/Modules/Platform/Linux-icpc.cmake
new file mode 100644
index 0000000..dc5bd43
--- /dev/null
+++ b/Modules/Platform/Linux-icpc.cmake
@@ -0,0 +1,12 @@
+SET (CMAKE_C_FLAGS_INIT "")
+SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
+SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
+SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
+SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+
+SET (CMAKE_CXX_FLAGS_INIT "")
+SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
+SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
+SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
+SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+
diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake
index f2846bc..183c8a0 100644
--- a/Modules/Platform/SunOS.cmake
+++ b/Modules/Platform/SunOS.cmake
@@ -24,6 +24,12 @@ IF(CMAKE_SYSTEM MATCHES "SunOS-5*.")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-R")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-h")
+ ELSE(CMAKE_COMPILER_IS_GNUCC)
+ SET (CMAKE_C_FLAGS_INIT "")
+ SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
+ SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-O3 -DNDEBUG")
+ SET (CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
+ SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC")
@@ -31,6 +37,12 @@ IF(CMAKE_SYSTEM MATCHES "SunOS-5*.")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-R")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-h")
+ ELSE(CMAKE_COMPILER_IS_GNUCXX)
+ SET (CMAKE_CXX_FLAGS_INIT "")
+ SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
+ SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3 -DNDEBUG")
+ SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
+ SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
ENDIF(CMAKE_SYSTEM MATCHES "SunOS-5*.")