aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Fabio Bas2009-08-22 12:09:24 +0000
committerGravatar Fabio Bas2009-08-22 12:09:24 +0000
commit84db179e4d963a3299919287b8eaf5b035bfe79a (patch)
tree8c3cc3943b91ac67394b655a880eda59a29cff53
parentrestored .config/KVIrc/log/ as default path for log files (fixes #371) (diff)
downloadKVIrc-84db179e4d963a3299919287b8eaf5b035bfe79a.tar.gz
KVIrc-84db179e4d963a3299919287b8eaf5b035bfe79a.tar.bz2
KVIrc-84db179e4d963a3299919287b8eaf5b035bfe79a.zip
Added a check in the main CMakelists.txt to discriminate if the compiler is gcc;
then, added most of the proposed compilation flags of #535 git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3419 17fca916-40b9-46aa-a4ea-0a15b648b75c
-rw-r--r--CMakeLists.txt21
1 files changed, 18 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d47da11e3..71fd97a68 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -121,10 +121,25 @@ IF(WANT_DEBUG)
SET(CMAKE_BUILD_TYPE Debug)
SET(CMAKE_STATUS_DEBUG_SUPPORT "Yes")
LIST(APPEND CMAKE_KVIRC_BUILD_FLAGS DEBUG)
- #force gdb format of debug symbols
- SET(CMAKE_CXX_FLAGS "-O0 -ggdb")
- SET(CMAKE_C_FLAGS "-O0 -ggdb")
+ IF(CMAKE_COMPILER_IS_GNUCXX)
+ #force gdb format of debug symbols
+ SET(CMAKE_CXX_FLAGS "-O0 -ggdb -pipe --exec-charset=UTF-8 --input-charset=UTF-8 --visibility-inlines-hidden --no-implement-inlines --unit-at-a-time --fast-math")
+ SET(CMAKE_C_FLAGS "-O0 -ggdb -pipe --exec-charset=UTF-8 --input-charset=UTF-8 --visibility-inlines-hidden --no-implement-inlines --unit-at-a-time --fast-math")
+ ELSE()
+ #this small set of options should work on almost all compilers
+ SET(CMAKE_CXX_FLAGS "-O0 -g")
+ SET(CMAKE_C_FLAGS "-O0 -g")
+ ENDIF()
ELSE()
+ IF(CMAKE_COMPILER_IS_GNUCXX)
+ #force gdb options
+ SET(CMAKE_CXX_FLAGS "-O3 -fomit-frame-pointer -DNDEBUG --no-enforce-eh-specs -pipe --exec-charset=UTF-8 --input-charset=UTF-8 --visibility-inlines-hidden --no-implement-inlines --unit-at-a-time --fast-math")
+ SET(CMAKE_C_FLAGS "-O3 -fomit-frame-pointer -DNDEBUG --no-enforce-eh-specs -pipe --exec-charset=UTF-8 --input-charset=UTF-8 --visibility-inlines-hidden --no-implement-inlines --unit-at-a-time --fast-math")
+ ELSE()
+ #this small set of options should work on almost all compilers
+ SET(CMAKE_CXX_FLAGS "-O3")
+ SET(CMAKE_C_FLAGS "-O3")
+ ENDIF()
SET(CMAKE_BUILD_TYPE Release)
SET(CMAKE_STATUS_DEBUG_SUPPORT "No")
ENDIF()