diff --git a/development/cmake/ConfigureChecks.cmake b/development/cmake/ConfigureChecks.cmake index 2de915f7e7..46d3f809b7 100644 --- a/development/cmake/ConfigureChecks.cmake +++ b/development/cmake/ConfigureChecks.cmake @@ -61,6 +61,7 @@ check_symbol_exists(pid_t "sys/types.h" HAVE_PID_T) check_symbol_exists(intmax_t "inttypes.h" HAVE_INTTYPES_H_WITH_UINTMAX) check_symbol_exists(uintmax_t "stdint.h" HAVE_STDINT_H_WITH_UINTMAX) check_symbol_exists(LC_MESSAGES "locale.h" HAVE_LC_MESSAGES) +check_symbol_exists(PATH_MAX "limits.h" HAVE_DEF_PATH_MAX) check_type_size(intmax_t HAVE_INTMAX_T) macro_bool_to_01(HAVE_UINTMAX_T HAVE_STDINT_H_WITH_UINTMAX) @@ -172,6 +173,16 @@ check_cxx_source_compiles( " lyx_cv_prog_clang) +check_cxx_source_compiles( + " + #include + using std::make_unique; + int main() { + return(0); + } + " +HAVE_DEF_MAKE_UNIQUE) + set(USE_LLVM_LIBCPP) set(STD_STRING_USES_COW) set(USE_GLIBCXX_CXX11_ABI) @@ -230,4 +241,3 @@ elseif(LYX_USE_QT MATCHES "QT4") else() message(FATAL_ERROR "Check for QT_USES_X11: Not handled LYX_USE_QT (= ${LYX_USE_QT})") endif() - diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake index a0325459e5..253d39fc44 100644 --- a/development/cmake/config.h.cmake +++ b/development/cmake/config.h.cmake @@ -48,7 +48,7 @@ #cmakedefine USE_POSIX_PACKAGING 1 #cmakedefine USE_WINDOWS_PACKAGING 1 #cmakedefine USE_MACOSX_PACKAGING 1 -#cmakedefine PATH_MAX ${PATH_MAX} +#cmakedefine HAVE_DEF_PATH_MAX 1 #cmakedefine WORDS_BIGENDIAN 1 @@ -86,6 +86,7 @@ ${Include_used_spellchecker} #define ENABLE_NLS 1 #endif +#cmakedefine HAVE_DEF_MAKE_UNIQUE 1 #endif // config.h guard diff --git a/development/cmake/modules/FindCXX11Compiler.cmake b/development/cmake/modules/FindCXX11Compiler.cmake index 5d127cf6c6..ddd4713dad 100644 --- a/development/cmake/modules/FindCXX11Compiler.cmake +++ b/development/cmake/modules/FindCXX11Compiler.cmake @@ -41,6 +41,7 @@ else() set(CXX11_FLAG_CANDIDATES "--std=gnu++11") else() set(CXX11_FLAG_CANDIDATES + "--std=c++14" "--std=c++11" "--std=gnu++11" "--std=gnu++0x"