Cmake build: Amend 41e409f8: Use std::call_once only if it is actually available

This commit is contained in:
Kornel Benko 2016-08-07 11:32:53 +02:00
parent 41e409f8f7
commit 2d49342ce3
2 changed files with 14 additions and 0 deletions

View File

@ -184,6 +184,17 @@ check_cxx_source_compiles(
"
HAVE_DEF_MAKE_UNIQUE)
check_cxx_source_compiles(
"
#include <mutex>
static std::once_flag flag;
int main() {
std::call_once(flag, [](){ return; });
return(0);
}
"
LYX_USE_STD_CALL_ONCE)
set(USE_LLVM_LIBCPP)
set(STD_STRING_USES_COW)
set(USE_GLIBCXX_CXX11_ABI)

View File

@ -91,6 +91,9 @@ ${Include_used_spellchecker}
#cmakedefine HAVE_DEF_MAKE_UNIQUE 1
// Define to 1 if std::call_once is supported by the compiler
#cmakedefine LYX_USE_STD_CALL_ONCE 1
#endif // config.h guard