mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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.
This commit is contained in:
parent
0862042b28
commit
c26db650a1
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user