mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
Switch to C++17 for Mac OS X
This commit is contained in:
parent
509c039e2f
commit
bbadbdbfdb
|
@ -5,7 +5,7 @@ SSLROOT = ${BREWROOT}/opt/openssl@1.1
|
||||||
UPNPROOT = ${BREWROOT}/opt/miniupnpc
|
UPNPROOT = ${BREWROOT}/opt/miniupnpc
|
||||||
|
|
||||||
CXXFLAGS ?= ${CXX_DEBUG} -Wall -Wno-overloaded-virtual
|
CXXFLAGS ?= ${CXX_DEBUG} -Wall -Wno-overloaded-virtual
|
||||||
NEEDED_CXXFLAGS ?= -std=c++11
|
NEEDED_CXXFLAGS ?= -std=c++17
|
||||||
INCFLAGS ?= -I${SSLROOT}/include -I${BOOSTROOT}/include
|
INCFLAGS ?= -I${SSLROOT}/include -I${BOOSTROOT}/include
|
||||||
LDFLAGS ?= ${LD_DEBUG}
|
LDFLAGS ?= ${LD_DEBUG}
|
||||||
DEFINES += -DMAC_OSX
|
DEFINES += -DMAC_OSX
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
CXX = clang++
|
CXX = clang++
|
||||||
CXXFLAGS := ${CXX_DEBUG} -Wall -std=c++11
|
CXXFLAGS := ${CXX_DEBUG} -Wall -std=c++17
|
||||||
INCFLAGS = -I/usr/local/include
|
INCFLAGS = -I/usr/local/include
|
||||||
DEFINES := -DMAC_OSX
|
DEFINES := -DMAC_OSX
|
||||||
LDFLAGS := -Wl,-rpath,/usr/local/lib -L/usr/local/lib
|
LDFLAGS := -Wl,-rpath,/usr/local/lib -L/usr/local/lib
|
||||||
|
|
|
@ -9,7 +9,9 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#if defined(MAC_OSX)
|
#if defined(MAC_OSX)
|
||||||
|
#if !STD_FILESYSTEM
|
||||||
#include <boost/system/system_error.hpp>
|
#include <boost/system/system_error.hpp>
|
||||||
|
#endif
|
||||||
#include <TargetConditionals.h>
|
#include <TargetConditionals.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
#ifndef STD_FILESYSTEM
|
#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
|
(__cplusplus >= 201703L) && __has_include(<filesystem>)) // C++ 17 or higher and supports std::filesystem
|
||||||
# define STD_FILESYSTEM 1
|
# define STD_FILESYSTEM 1
|
||||||
# else
|
# else
|
||||||
|
|
Loading…
Reference in a new issue