From c26db650a1e93573e4c09d4612ad45ae1e219854 Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Wed, 29 Sep 2021 17:53:50 +0200 Subject: [PATCH] Cmake build: Fix the invalid test for '-Wno-deprecated-copy' flag The original test was always successfull, even if the flag was invalid. But checking for '-Wdeprecated-copy' instead yields to error if the warning does not exist. Existent warning for 'deprecated-copy' implies that 'no-deprecated-copy' also exist. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ecebdc91bc..5e9c7c860b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -714,7 +714,7 @@ else() # check_cxx_source_compiles("..." HAVE_DEF_MAKE_UNIQUE) include(CheckCXXCompilerFlag) unset(CHECK_WNODEPRECATEDCOPY_FLAG CACHE) - CHECK_CXX_COMPILER_FLAG("-Wno-deprecated-copy" CHECK_WNODEPRECATEDCOPY_FLAG) + CHECK_CXX_COMPILER_FLAG("-Wdeprecated-copy" CHECK_WNODEPRECATEDCOPY_FLAG) if(${CHECK_WNODEPRECATEDCOPY_FLAG}) set(LYX_CXX_FLAGS "-Wall -Wextra -Wno-deprecated-copy ${LYX_GCC11_MODE}${LYX_CXX_FLAGS}") else()