aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2012-08-17 07:15:50 -0300
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2012-08-17 07:15:50 -0300
commit9d5fdf0e88183acf04df225b654e3d77105b80b6 (patch)
tree3955f690a137a9b9fec83de94889ea70f657eafc
parentf866e32ecca3e7dddc87afcab4706cf90fcb694d (diff)
downloadextra-cmake-modules-9d5fdf0e88183acf04df225b654e3d77105b80b6.tar.gz
extra-cmake-modules-9d5fdf0e88183acf04df225b654e3d77105b80b6.tar.bz2
Enable the additional GCC compiler flags on all systems.
There was no reason to add more flags only on Linux/Hurd; in fact, in kdelibs' FindKDE4Internal.cmake there's also a block with similar settings for the BSDs. Make it more general by removing the system checks before setting these flags. -Wno-long-long is particularly needed when one is building code with -pedantic (see picmi, for example). CCMAIL: kde-buildsystem@kde.org
-rw-r--r--kde-modules/KDECompilerSettings.cmake12
1 files changed, 3 insertions, 9 deletions
diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake
index 12bd1e3a..ac21cf74 100644
--- a/kde-modules/KDECompilerSettings.cmake
+++ b/kde-modules/KDECompilerSettings.cmake
@@ -321,15 +321,9 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set (CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
set (CMAKE_MODULE_LINKER_FLAGS_PROFILE "${CMAKE_MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
-
- if (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU)
- set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
- # As off Qt 4.6.x we need to override the new exception macros if we want compile with -fno-exceptions
- set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common")
-# TODO: the following line was added by Dirk in 2007 to make snprintf() available. But this should not be necessary, since
-# _BSD_SOURCE is already added to _KDE4_PLATFORM_DEFINITIONS (http://quickgit.kde.org/index.php?p=kdelibs.git&a=commitdiff&h=4a44862b2d178c1d2e1eb4da90010d19a1e4a42c&hp=6531561cb4ed978ff86b8d840dcafc9705af5527)
-# add_definitions (-D_BSD_SOURCE)
- endif ()
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
+ # As of Qt 4.6.x we need to override the new exception macros if we want compile with -fno-exceptions
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common")
if (CMAKE_SYSTEM_NAME STREQUAL GNU)
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread")