Cmake build: Check for string COW by checking for library, not compiler

Changed according to automake behaviour, see 385f3e8abd
This commit is contained in:
Kornel Benko 2014-12-19 12:32:14 +01:00
parent 385f3e8abd
commit 98d063e9be

View File

@ -126,16 +126,29 @@ 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()
# Check whether STL is libstdc++
check_cxx_source_compiles(
"
#include <vector>
int main() {
#if ! defined(__GLIBCXX__) && ! defined(__GLIBCPP__)
this is not libstdc++
#endif
return(0);
}
"
STD_STRING_USES_COW)
#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)