Switch to C++17 for Mac OS X

This commit is contained in:
orignal 2024-09-01 15:23:14 -04:00
parent 509c039e2f
commit bbadbdbfdb
4 changed files with 5 additions and 3 deletions

View File

@ -5,7 +5,7 @@ SSLROOT = ${BREWROOT}/opt/openssl@1.1
UPNPROOT = ${BREWROOT}/opt/miniupnpc
CXXFLAGS ?= ${CXX_DEBUG} -Wall -Wno-overloaded-virtual
NEEDED_CXXFLAGS ?= -std=c++11
NEEDED_CXXFLAGS ?= -std=c++17
INCFLAGS ?= -I${SSLROOT}/include -I${BOOSTROOT}/include
LDFLAGS ?= ${LD_DEBUG}
DEFINES += -DMAC_OSX

View File

@ -1,5 +1,5 @@
CXX = clang++
CXXFLAGS := ${CXX_DEBUG} -Wall -std=c++11
CXXFLAGS := ${CXX_DEBUG} -Wall -std=c++17
INCFLAGS = -I/usr/local/include
DEFINES := -DMAC_OSX
LDFLAGS := -Wl,-rpath,/usr/local/lib -L/usr/local/lib

View File

@ -9,7 +9,9 @@
#include <algorithm>
#if defined(MAC_OSX)
#if !STD_FILESYSTEM
#include <boost/system/system_error.hpp>
#endif
#include <TargetConditionals.h>
#endif

View File

@ -16,7 +16,7 @@
#include <functional>
#ifndef STD_FILESYSTEM
# if (!defined(MAC_OSX) && !TARGET_OS_SIMULATOR && \
# if (!TARGET_OS_SIMULATOR && \
(__cplusplus >= 201703L) && __has_include(<filesystem>)) // C++ 17 or higher and supports std::filesystem
# define STD_FILESYSTEM 1
# else