mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Cmake build: Detect clang and adapt definition of STD_STRING_USES_COW.
This commit is contained in:
parent
1df5d28df5
commit
edf22ba723
@ -259,13 +259,10 @@ if(UNIX OR MINGW)
|
||||
endif()
|
||||
set(LYX_GCC11_MODE "${CXX11_FLAG}")
|
||||
endif()
|
||||
set(STD_STRING_USES_COW 1)
|
||||
else()
|
||||
if(MSVC10)
|
||||
set(LYX_USE_TR1 1)
|
||||
#set(LYX_USE_TR1_REGEX 1) #TODO should we use it in ECMAScript mode?
|
||||
else()
|
||||
set(STD_STRING_USES_COW 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -126,6 +126,17 @@ check_cxx_source_compiles(
|
||||
"
|
||||
LYX_CALLSTACK_PRINTING)
|
||||
|
||||
get_filename_component(cxx_base "${CMAKE_CXX_COMPILER}" NAME_WE)
|
||||
if(cxx_base MATCHES "^clang(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\+\\+)?$")
|
||||
set(STD_STRING_USES_COW)
|
||||
else()
|
||||
if("${MINGW}")
|
||||
set(STD_STRING_USES_COW)
|
||||
else()
|
||||
set(STD_STRING_USES_COW 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LYX_USE_QT MATCHES "QT5")
|
||||
if (Qt5X11Extras_FOUND)
|
||||
get_target_property(_x11extra_prop Qt5::X11Extras IMPORTED_CONFIGURATIONS)
|
||||
|
@ -60,6 +60,9 @@
|
||||
// Define if callstack can be printed
|
||||
#cmakedefine LYX_CALLSTACK_PRINTING 1
|
||||
|
||||
// Define if std::string uses copy-on-write
|
||||
#cmakedefine STD_STRING_USES_COW 1
|
||||
|
||||
#cmakedefine Z_PREFIX 1
|
||||
|
||||
${Include_used_spellchecker}
|
||||
|
Loading…
Reference in New Issue
Block a user