summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt5
-rw-r--r--src/2geom/CMakeLists.txt4
2 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 997596af3..e38122b9e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,11 @@ if(WIN32)
set(CMAKE_INSTALL_MESSAGE "LAZY")
endif()
+# Define a very strict set of build flags that will prevent any use of deprecated symbols.
+# This will almost certainly cause compilation failure and is intended only for developer use.
+set(CMAKE_BUILD_TYPE Strict)
+set(CMAKE_CXX_FLAGS_STRICT "${CMAKE_CXX_FLAGS_DEBUG} -Werror=deprecated-declarations -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTKMM_DISABLE_DEPRECATED -DGDKMM_DISABLE_DEPRECATED")
+set(CMAKE_C_FLAGS_STRICT "${CMAKE_C_FLAGS_DEBUG} -Werror=deprecated-declarations -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTKMM_DISABLE_DEPRECATED -DGDKMM_DISABLE_DEPRECATED")
# -----------------------------------------------------------------------------
# Redirect output files
diff --git a/src/2geom/CMakeLists.txt b/src/2geom/CMakeLists.txt
index aa51d51bd..d2c1ea50e 100644
--- a/src/2geom/CMakeLists.txt
+++ b/src/2geom/CMakeLists.txt
@@ -1,3 +1,7 @@
+# Override error flag just for this folder
+if (CMAKE_BUILD_TYPE MATCHES Strict)
+ set(CMAKE_CXX_FLAGS_STRICT "${CMAKE_CXX_FLAGS_STRICT} -Wno-error=deprecated-declarations")
+endif()
set(2geom_SRC
affine.cpp