aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt29
1 files changed, 16 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7d12f76..24fa0cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,6 +27,21 @@ else()
set(CMAKE_BUILD_TYPE "Release")
endif()
+if(ENABLE_WERROR)
+ add_definitions("-Werror")
+endif()
+
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ add_definitions("-Weverything")
+else()
+ add_definitions("-Wall")
+endif()
+
+# Thread fix for old CMake
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
+
# Check for prerequisites
set(DEPS glib-2.0>=2.58 gtk+-3.0>=3.24)
@@ -37,19 +52,7 @@ pkg_check_modules(PROJECT_DEPS REQUIRED ${DEPS})
# Set global variables
include(GNUInstallDirs)
-set(PROJECT_VERSION "0.8.2")
-
-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(PROJECT_VERSION "0.10.2")
# Make everything