build: use std:: proxy for nonstd:: on non-macOS
The nonstd:: implementation of nonstd::variant was causing a link error in the Debug configuration on MSYS2 CLANG64. Set the macros for choosing the implementation of both nonstd::optional and nonstd::variant to the std:: forwarding behavior on all platforms other than macOS. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
1c76e3b0f4
commit
e19e13fa0a
|
@ -491,8 +491,13 @@ add_definitions(-D__STDC_FORMAT_MACROS)
|
||||||
|
|
||||||
# For C++, default to nonstd::optional and nonstd::variant for now due to mac
|
# For C++, default to nonstd::optional and nonstd::variant for now due to mac
|
||||||
# build issues.
|
# build issues.
|
||||||
add_definitions(-Doptional_CONFIG_SELECT_OPTIONAL=optional_OPTIONAL_NONSTD)
|
if(APPLE)
|
||||||
add_definitions(-Dvariant_CONFIG_SELECT_VARIANT=variant_VARIANT_NONSTD)
|
add_definitions(-Doptional_CONFIG_SELECT_OPTIONAL=optional_OPTIONAL_NONSTD)
|
||||||
|
add_definitions(-Dvariant_CONFIG_SELECT_VARIANT=variant_VARIANT_NONSTD)
|
||||||
|
else()
|
||||||
|
add_definitions(-Doptional_CONFIG_SELECT_OPTIONAL=optional_OPTIONAL_STD)
|
||||||
|
add_definitions(-Dvariant_CONFIG_SELECT_VARIANT=variant_VARIANT_STD)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_LINK)
|
if(ENABLE_LINK)
|
||||||
# IPC linking code needs sem_timedwait which can be either in librt or pthreads
|
# IPC linking code needs sem_timedwait which can be either in librt or pthreads
|
||||||
|
|
Loading…
Reference in New Issue