mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Cmake build: Added code to compile with QT5.7
QT5.7 cmake config files explicitly instruct cmake to use `-std=gnu++11`. This is not the same as is found by our FindCXX11Compiler.cmake, which leads to compilation errors. Here we overrule the setting. Thanks to helpfull hand from Brad King <brad.king@kitware.com>
This commit is contained in:
parent
19e0adb86b
commit
7eea0b6fa8
@ -572,7 +572,15 @@ if(NOT MSVC)
|
|||||||
if(NOT LYX_QUIET)
|
if(NOT LYX_QUIET)
|
||||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||||
endif()
|
endif()
|
||||||
set(LYX_CXX_FLAGS "-Wall -Wunused-parameter ${LYX_GCC11_MODE}")
|
set(LYX_CXX_FLAGS "-Wall -Wunused-parameter ${LYX_GCC11_MODE}")
|
||||||
|
if(LYX_CXX_FLAGS MATCHES "\\+\\+(14|11|98)")
|
||||||
|
# Thanks to Brad King <brad.king@kitware.com>
|
||||||
|
# for the pointer to https://cmake.org/cmake/help/v3.6/variable/CMAKE_CXX_STANDARD.html
|
||||||
|
# This allows us to use QT5.7 with recent g++ (version >= 4.9) compilers
|
||||||
|
# and still use our own c++ extension tests
|
||||||
|
set(CMAKE_CXX_STANDARD ${CMAKE_MATCH_1})
|
||||||
|
message(STATUS "CMAKE_CXX_STANDARD set to ${CMAKE_CXX_STANDARD}")
|
||||||
|
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")
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user