X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=CMakeLists.txt;h=24deb865708efd8f84527ee658cbe0248ab2ea8f;hp=c765699322b018b6752a288442e72bb1113b62eb;hb=1eb37b0c2ddc69041a267afeed5a494a3599b538;hpb=2351076991b1ccb6bd3ef06ed11450fedd74bba5 diff --git a/CMakeLists.txt b/CMakeLists.txt index c7656993..24deb865 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,10 @@ option(STATIC "Enable static building (might not be portable)" OFF) if(APPLE) option(DEPLOY "Mac OS X only! Adds required libs to bundle resources and create a dmg. Note: requires Qt to be built with 10.4u SDK" OFF) - option(WITH_NOTIFICATION_CENTER "Enable OS X Notification Center support" ON) + # Notification Center is only available in > 10.8, which is Darwin v12 + if(CMAKE_SYSTEM_VERSION VERSION_GREATER "11.9.9") + option(WITH_NOTIFICATION_CENTER "Enable OS X Notification Center support" ON) + endif(CMAKE_SYSTEM_VERSION VERSION_GREATER "11.9.9") endif(APPLE) # Default to embedding data in the static case @@ -149,6 +152,16 @@ if(CMAKE_COMPILER_IS_GNUCXX) endif() endif(CMAKE_COMPILER_IS_GNUCXX) +# ... and for Clang +if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wextra -Wpointer-arith -Wformat-security -Woverloaded-virtual -fno-common -Werror=return-type") +# set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG -DQT_NO_DEBUG") # Use CMake default +# set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG -DQT_NO_DEBUG") # Use CMake default + set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-inline") + set(CMAKE_CXX_FLAGS_DEBUGFULL "-g3 -fno-inline") + set(CMAKE_CXX_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs") +endif() + # Mac build stuff if(APPLE AND DEPLOY) set(CMAKE_OSX_ARCHITECTURES "x86_64") @@ -322,7 +335,7 @@ if(BUILD_GUI) include_directories(${KDE4_INCLUDES}) add_definitions(-DHAVE_KDE ${KDE4_DEFINITIONS}) set(HAVE_KDE 1) - set(CLIENT_LIBRARIES ${CLIENT_LIBRARIES} ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBRARY} ${KDE4_SOLID_LIBS} knotifyconfig) + set(CLIENT_LIBRARIES ${CLIENT_LIBRARIES} ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBRARY} ${KDE4_SOLID_LIBS} ${KDE4_KNOTIFYCONFIG_LIBRARY}) # We always use external icons for KDE4 support, since we use its iconloader rather than our own set(EMBED_DATA OFF) else(KDE4_FOUND)