diff --git a/Makefile b/Makefile index d86de7d..42dda60 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ endif # Platform compiler flags ifeq ($(OS),Darwin) - CXX = $(shell wx-config --cxx) -D__WXMAC__ + CXX = $(shell wx-config --cxx) -D__WXMAC__ -std=c++11 LDLIBS += /usr/local/lib/libssh2.a else LDLIBS += -lssh2 @@ -45,10 +45,17 @@ endif ifeq ($(OS),Windows_NT) CXXFLAGS += -static - CXX += -std=gnu++11 -I/include -DWIN32 + CXX += -std=gnu++11 -Wno-unknown-pragmas -Wno-missing-field-initializers -I/include -DWIN32 LDLIBS += -L/lib -lwsock32 -else - CXX += -std=c++11 +endif + +ifeq ($(OS),Linux) + CXX += -std=c++11 +endif + +# Travis CI workaround +ifeq ($(CI),true) + CXX += -std=gnu++11 endif CXX += -Iinclude -I. -I/usr/local/include diff --git a/Windows-Build.md b/Windows-Build.md index f458c4e..b0eed33 100644 --- a/Windows-Build.md +++ b/Windows-Build.md @@ -21,7 +21,8 @@ In order to keep a consistent build system, Tyro is built with MinGW and Msys. T 1. Download the windows [installer](https://www.wxwidgets.org/downloads/) for version 3 2. Use the MSyS prompt to navigate to the wxWidgets directory 3. Make a new folder, eg. msw-debug, and cd into it. -4. Run `../configure --disable-shared --enable-debug --disable-compat28 --enable-arttango` in that new directory. +4. Run `export CXXFLAGS="-std=gnu++11 $CXXFLAGS"` to allow usage of C++11 features +5. Run `../configure --disable-shared --enable-debug --disable-compat28` in that new directory. 5. After configure finishes, run `make && make install` in the same folder.