mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Cmake build: Omit use -f '-Wno-deprecated-copy' on compilers which do not support this flag.
Patch from P. De Visschere Citing Patrick: As is stands the patch unsets the test-variable from the cache and the test is performed for each cmake-run. Otherwise after running cmake once the check is never run again, until one throws away the cmakecache.txt, which I try to avoid. I suppose that after time this check will be forgotten and if the issue is solved (by an upgrade of the Apple clang compiler) this will pass unnoticed.
This commit is contained in:
parent
eb2e8e1579
commit
fa704d50f7
@ -699,7 +699,14 @@ else()
|
|||||||
# The following setting with LYX_GCC11_MODE is needed because cmake does not honor
|
# The following setting with LYX_GCC11_MODE is needed because cmake does not honor
|
||||||
# CMAKE_CXX_STANDARD while performing tests like
|
# CMAKE_CXX_STANDARD while performing tests like
|
||||||
# check_cxx_source_compiles("..." HAVE_DEF_MAKE_UNIQUE)
|
# 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)
|
||||||
|
if(${CHECK_WNODEPRECATEDCOPY_FLAG})
|
||||||
set(LYX_CXX_FLAGS "-Wall -Wextra -Wno-deprecated-copy ${LYX_GCC11_MODE}${LYX_CXX_FLAGS}")
|
set(LYX_CXX_FLAGS "-Wall -Wextra -Wno-deprecated-copy ${LYX_GCC11_MODE}${LYX_CXX_FLAGS}")
|
||||||
|
else()
|
||||||
|
set(LYX_CXX_FLAGS "-Wall -Wextra ${LYX_GCC11_MODE}${LYX_CXX_FLAGS}")
|
||||||
|
endif()
|
||||||
if(LYX_STDLIB_DEBUG)
|
if(LYX_STDLIB_DEBUG)
|
||||||
set(LYX_CXX_FLAGS "${LYX_CXX_FLAGS} -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
|
set(LYX_CXX_FLAGS "${LYX_CXX_FLAGS} -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
|
||||||
else()
|
else()
|
||||||
|
Loading…
Reference in New Issue
Block a user