diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 7 insertions, 14 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 |