diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-02-17 16:42:41 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-02-17 16:42:41 +0100 |
commit | 0ef4fc107ac7a9bc0ea6418076be8510eb862ecc (patch) | |
tree | d525d03275c657c9187ca126485bf4285de77dc9 | |
parent | 3bbc1d0c2b8a54a940ef78300748074f3bf8f0d7 (diff) | |
parent | ef11732b871d63d70d58e4d397d8a4c42e81ab0c (diff) | |
download | ayatana-indicator-application-0ef4fc107ac7a9bc0ea6418076be8510eb862ecc.tar.gz ayatana-indicator-application-0ef4fc107ac7a9bc0ea6418076be8510eb862ecc.tar.bz2 ayatana-indicator-application-0ef4fc107ac7a9bc0ea6418076be8510eb862ecc.zip |
Merge branch 'tari01-pr/cleanup-compile-flags'
Attributes GH PR #23: https://github.com/AyatanaIndicators/ayatana-indicator-application/pull/23
-rw-r--r-- | .build.yml | 1 | ||||
-rw-r--r-- | CMakeLists.txt | 21 | ||||
-rw-r--r-- | src/CMakeLists.txt | 2 |
3 files changed, 7 insertions, 17 deletions
@@ -144,7 +144,6 @@ before_scripts: build_scripts: - if [ ${DISTRO_NAME} == "debian" ];then - - export CFLAGS+=" -Wsign-compare -Wunused-parameter" - cppcheck --enable=warning,style,performance,portability,information,missingInclude . - fi - 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") |