diff options
-rw-r--r-- | .build.yml | 1 | ||||
-rw-r--r-- | CMakeLists.txt | 16 | ||||
-rw-r--r-- | tests/service-mocks/media-player-mpris-mock/CMakeLists.txt | 3 |
3 files changed, 8 insertions, 12 deletions
@@ -267,7 +267,6 @@ before_scripts: build_scripts: - if [ ${DISTRO_NAME} == "debian" ];then - - export CFLAGS+=" -Wsign-compare -Wunused-parameter" - cppcheck --enable=warning,style,performance,portability,information,missingInclude --inline-suppr --library=qt --suppress=missingInclude . - fi - diff --git a/CMakeLists.txt b/CMakeLists.txt index a4618aa..9c3dfa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,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() set(GETTEXT_PACKAGE "ayatana-indicator-sound") @@ -82,13 +87,6 @@ find_package(GObjectIntrospection 0.9.12) include_directories(${SOURCE_DIR}) include_directories(${SOURCE_BINARY_DIR}) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - -add_definitions( - -Wall -) - configure_file( "config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h" diff --git a/tests/service-mocks/media-player-mpris-mock/CMakeLists.txt b/tests/service-mocks/media-player-mpris-mock/CMakeLists.txt index abe109e..27302f0 100644 --- a/tests/service-mocks/media-player-mpris-mock/CMakeLists.txt +++ b/tests/service-mocks/media-player-mpris-mock/CMakeLists.txt @@ -1,8 +1,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fPIC -pthread") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -fno-strict-aliasing -Wextra -fPIC -pthread") +add_definitions("-fPIC") find_package(Qt5DBus REQUIRED) include_directories(${Qt5DBus_INCLUDE_DIRS} |