diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-01-27 10:07:53 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-01-27 10:07:53 +0100 |
commit | d70bd10f47f92928b3a918a82cdab230ffb1a5b0 (patch) | |
tree | ce058cc598058adcfba7c68526eac30e106535cd /CMakeLists.txt | |
parent | eeb9ddc6a66cd84d89141866d629800f729d9883 (diff) | |
parent | 6cf760460cfa3bdc126e8a6699e654f36d314205 (diff) | |
download | ayatana-indicator-power-d70bd10f47f92928b3a918a82cdab230ffb1a5b0.tar.gz ayatana-indicator-power-d70bd10f47f92928b3a918a82cdab230ffb1a5b0.tar.bz2 ayatana-indicator-power-d70bd10f47f92928b3a918a82cdab230ffb1a5b0.zip |
Merge branch 'tari01-pr/cleanup-compile-flags'
Attributes GH PR #55: https://github.com/AyatanaIndicators/ayatana-indicator-power/pull/55
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1de415a..2bdab9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,10 +23,17 @@ 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 + ## ## GNU standard installation directories ## @@ -87,20 +94,6 @@ add_custom_target (cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2 ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests) -## -## Actual building -## - -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(C_WARNING_ARGS "${C_WARNING_ARGS} -Weverything") - set(C_WARNING_ARGS "${C_WARNING_ARGS} -Wno-c++98-compat -Wno-padded") # these are annoying - set(C_WARNING_ARGS "${C_WARNING_ARGS} -Wno-documentation") # gtk-doc != doxygen -else() - set(C_WARNING_ARGS "${C_WARNING_ARGS} -Wall -Wformat=2") # Use -Wextra and -Wpedantic explicitly if needed -endif() -set(C_WARNING_ARGS "${C_WARNING_ARGS} -Wno-missing-field-initializers") # GActionEntry - - include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories (${CMAKE_CURRENT_BINARY_DIR}/include) @@ -109,7 +102,6 @@ add_subdirectory(src) add_subdirectory(data) add_subdirectory(po) - # testing & coverage if (ENABLE_TESTS) enable_testing () |