mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 18:03:37 +08:00
Allow C++ standard to be passed to CHECK_CXX_SOURCE_COMPILES
Work around the issue in CMake where C++ standard doesn't get propagated to CHECK_CXX_SOURCE_COMPILES. Also correctly check for std::make_unique; the define was missing from the config.h header.
This commit is contained in:
parent
10ac83ae32
commit
87854c81f5
|
@ -4,6 +4,12 @@
|
|||
# `wcstod_l` is a GNU-extension, sometimes hidden behind GNU-related defines.
|
||||
# This is the case for at least Cygwin and Newlib.
|
||||
LIST(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE=1)
|
||||
|
||||
|
||||
# Work around the fact that cmake does not propagate the language standard flag into
|
||||
# the CHECK_CXX_SOURCE_COMPILES function. See CMake issue #16456.
|
||||
LIST(APPEND CMAKE_REQUIRED_FLAGS "${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION}")
|
||||
|
||||
IF(APPLE)
|
||||
INCLUDE(CheckCXXCompilerFlag)
|
||||
CHECK_CXX_COMPILER_FLAG("-Werror=unguarded-availability" REQUIRES_UNGUARDED_AVAILABILITY)
|
||||
|
|
|
@ -127,6 +127,9 @@
|
|||
/* Define to 1 if the _nl_msg_cat_cntr symbol is exported. */
|
||||
#cmakedefine HAVE__NL_MSG_CAT_CNTR 1
|
||||
|
||||
/* Define to 1 if std::make_unique is available. */
|
||||
#cmakedefine HAVE_STD__MAKE_UNIQUE 1
|
||||
|
||||
/* Define to 1 if the _sys_errs array is available. */
|
||||
#cmakedefine HAVE__SYS__ERRS 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user