diff options
author | Robert Tari <robert@tari.in> | 2022-02-17 02:28:24 +0100 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2022-02-17 02:28:24 +0100 |
commit | 8f7d4d4e664798c9a543dd4a53f03f20cec658fd (patch) | |
tree | efecc3746f4b4fc8ece005ac1ffe23636ac6c783 | |
parent | 3bbc1d0c2b8a54a940ef78300748074f3bf8f0d7 (diff) | |
download | ayatana-indicator-application-8f7d4d4e664798c9a543dd4a53f03f20cec658fd.tar.gz ayatana-indicator-application-8f7d4d4e664798c9a543dd4a53f03f20cec658fd.tar.bz2 ayatana-indicator-application-8f7d4d4e664798c9a543dd4a53f03f20cec658fd.zip |
Clean up compilation flags
-rw-r--r-- | CMakeLists.txt | 21 | ||||
-rw-r--r-- | src/CMakeLists.txt | 2 |
2 files changed, 7 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 06b10a3..09f6d22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,8 +19,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() # Check for prerequisites @@ -35,18 +40,6 @@ include(GNUInstallDirs) set(PROJECT_VERSION "0.8.91") set(PROJECT_NAME "ayatana-indicator-application") -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() - # Make everything add_subdirectory(data) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3220d0a..3918595 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -81,7 +81,6 @@ set(SOURCES indicator-application.c ) -set_source_files_properties(${SOURCES} PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) add_library("ayatana-application" SHARED ${SOURCES}) target_compile_definitions("ayatana-application" PUBLIC G_LOG_DOMAIN="Ayatana-Indicator-Application") target_include_directories("ayatana-application" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) @@ -102,7 +101,6 @@ set(SOURCES generate-id.c ) -set_source_files_properties(${SOURCES} PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) add_executable("ayatana-indicator-application-service" ${SOURCES}) target_compile_definitions("ayatana-indicator-application-service" PUBLIC DATADIR="${CMAKE_INSTALL_FULL_DATADIR}/ayatana-indicator-application") target_compile_definitions("ayatana-indicator-application-service" PUBLIC G_LOG_DOMAIN="ayatana-indicator-application-service") |