Browse Source

Switch to C++17 for Mac OS X

pull/2101/head
orignal 4 months ago
parent
commit
bbadbdbfdb
  1. 2
      Makefile.homebrew
  2. 2
      Makefile.osx
  3. 2
      libi2pd/FS.cpp
  4. 2
      libi2pd/FS.h

2
Makefile.homebrew

@ -5,7 +5,7 @@ SSLROOT = ${BREWROOT}/opt/openssl@1.1 @@ -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

2
Makefile.osx vendored

@ -1,5 +1,5 @@ @@ -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

2
libi2pd/FS.cpp

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

2
libi2pd/FS.h

@ -16,7 +16,7 @@ @@ -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

Loading…
Cancel
Save