aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt23
1 files changed, 9 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1dbe04d..81428f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,10 +24,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
##
@@ -47,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