diff options
author | Robert Tari <robert@tari.in> | 2021-12-17 09:14:40 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-01-27 09:36:36 +0100 |
commit | d40de8a81a759eac8714ccde45243ca7f6ac1a91 (patch) | |
tree | 3a067ef681c2f0e992d733dc76790a8d1b4f240a | |
parent | 904438acf7d91cd7ec27e7e348d8ffa2b67e42f3 (diff) | |
download | ayatana-indicator-session-d40de8a81a759eac8714ccde45243ca7f6ac1a91.tar.gz ayatana-indicator-session-d40de8a81a759eac8714ccde45243ca7f6ac1a91.tar.bz2 ayatana-indicator-session-d40de8a81a759eac8714ccde45243ca7f6ac1a91.zip |
Clean up compilation flags
-rw-r--r-- | CMakeLists.txt | 21 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/backend-dbus/CMakeLists.txt | 2 |
3 files changed, 7 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7195c77..81428f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,8 +24,13 @@ else() endif() if(ENABLE_WERROR) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") + add_definitions("-Werror") +endif() + +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + add_definitions("-Weverything") +else() + add_definitions("-Wall") endif() add_definitions("-Wno-sign-compare") # Needed for GTest on Ubuntu @@ -49,18 +54,6 @@ pkg_check_modules (SERVICE REQUIRED gio-unix-2.0>=2.36) include_directories (${SERVICE_INCLUDE_DIRS}) -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - - set(COMPILE_FLAGS "${COMPILE_FLAGS} -Weverything") - set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-c++98-compat -Wno-padded") - set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-documentation") - -else() - - set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wall") - -endif() - set (ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}) add_custom_target (dist COMMAND bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f03b98e..44751ca 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -50,7 +50,6 @@ add_custom_target( add_executable (test-service test-service.cc) target_link_options(test-service PRIVATE -no-pie) -set_target_properties (test-service PROPERTIES COMPILE_FLAGS " -std=c++0x") add_test (test-service test-service) add_dependencies (test-service libayatanaindicatorsessionservice backendmock gschemas-compiled) target_link_libraries (test-service libayatanaindicatorsessionservice backendmock ${SERVICE_LIBRARIES} ${GTEST_LIBRARIES} ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIBRARIES}) diff --git a/tests/backend-dbus/CMakeLists.txt b/tests/backend-dbus/CMakeLists.txt index 93ffc45..92d5a02 100644 --- a/tests/backend-dbus/CMakeLists.txt +++ b/tests/backend-dbus/CMakeLists.txt @@ -1,5 +1,3 @@ -SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") - # build desktopmock add_library (desktopmock STATIC mock-accounts.cc |