aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2012-08-17 07:11:21 -0300
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2012-08-17 07:11:21 -0300
commitf866e32ecca3e7dddc87afcab4706cf90fcb694d (patch)
treea56e05301e68b837b7b8f8c496170349f3fefa4b
parent7752d6d5b9b67987d4631cca4ce192069697a4e2 (diff)
downloadextra-cmake-modules-f866e32ecca3e7dddc87afcab4706cf90fcb694d.tar.gz
extra-cmake-modules-f866e32ecca3e7dddc87afcab4706cf90fcb694d.tar.bz2
Drop -ansi from the default CXXFLAGS.
In preparation for making having the default CXXFLAGS available on all systems using GCC instead of only Linux/Hurd, remove -ansi from the CXXFLAGS. strtoll(3), used, for example, in kdelibs, is part of C99; -ansi means GCC will switch to C89 and C++98, which breaks things on systems such as FreeBSD. It worked on glibc-based systems because libstdc++ always defines _GNU_SOURCE on Linux, which ends up enabling additional features. This change should not break existing code, as dropping -ansi actually means being less strict than before. Discussed in the kde-buildsystem mailing list [1]. [1] http://lists.kde.org/?t=134482883000001&r=1&w=2 CCMAIL: kde-buildsystem@kde.org
-rw-r--r--kde-modules/KDECompilerSettings.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake
index 1b38a1f4..12bd1e3a 100644
--- a/kde-modules/KDECompilerSettings.cmake
+++ b/kde-modules/KDECompilerSettings.cmake
@@ -325,7 +325,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
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 -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common")
+ 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)