From a408b0111175162ce33103bf80a99c213eb2eeef Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Tue, 13 Oct 2015 22:51:31 +0200 Subject: [PATCH] Add WITH_DEV_BUILD mode. It disables/warns about deprecated methods. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c1e961cb..105753383 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,7 @@ include(CheckCXXSourceCompiles) option(WITH_TESTS "Enable building of unit tests" ON) option(WITH_GUI_TESTS "Enable building of GUI tests" OFF) +option(WITH_DEV_BUILD "Use only for development. Disables/warns about deprecated methods." OFF) set(KEEPASSX_VERSION "2.0 beta 2") set(KEEPASSX_VERSION_NUM "1.9.92") @@ -107,6 +108,10 @@ endif() add_gcc_compiler_cflags("-ansi") +if(WITH_DEV_BUILD) + add_definitions(-DQT_DEPRECATED_WARNINGS -DGCRYPT_NO_DEPRECATED) +endif() + if(MINGW) set(CMAKE_RC_COMPILER_INIT windres) enable_language(RC)