mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-05 11:57:58 +00:00
Make "mymake" work on OSX, and add it to Travis.
Fix a -Wformat bug exposed by compiling with Clang. To preprocess C++11 code, you need `g++ -E -std=c++11`, not just `g++ -E`. (The old code worked for GCC 6+ and Clang 6+ because they changed the default mode from C++03 to C++14. But for GCC 5, we still need `-std=c++11`. And regardless, it's a good idea.) Add a "-mac" option to mymake, and cleanly factor out `set_mac`, `set_linux`, and `set_win`. When you build mymake using `make -f Makefile.simple mymake`, you get a mymake that knows what platform it's on. This means you don't have to pass `mymake -mac` on OSX, nor `mymake -win` on Windows. The old code put `INCLUDE(___hyper-main.cpp)` into a C++ file that would be preprocessed, which doesn't work because libSDL does essentially `-Dmain=SDL_main`, which turns this into `INCLUDE(___hyper-SDL_main.cpp)`, which gives us a "file not found" error from mymake. The solution is to put filenames into quotation marks, so that the string "main" never appears as a token in the C++ file. (Alternatively, we could have renamed "hyper-main.cpp" to "hypermain.cpp".) Add several new "mymake" entries in the Travis build matrix, and add the "mymake" builds' badge to the README.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<a href="https://travis-ci.org/zenorogue/hyperrogue/builds">
|
||||
<img align="right" src="https://badges.herokuapp.com/travis/zenorogue/hyperrogue?branch=master&env=TRAVIS_BUILD_SYSTEM=autotools&label=autotools" alt="TravisCI badge">
|
||||
<img align="right" src="https://badges.herokuapp.com/travis/zenorogue/hyperrogue?branch=master&env=TRAVIS_BUILD_SYSTEM=Makefile&label=make" alt="TravisCI badge">
|
||||
<img align="right" src="https://badges.herokuapp.com/travis/zenorogue/hyperrogue?branch=master&env=TRAVIS_BUILD_SYSTEM=mymake&label=mymake" alt="TravisCI badge">
|
||||
<img align="right" src="https://badges.herokuapp.com/travis/zenorogue/hyperrogue?branch=master&env=TRAVIS_BUILD_SYSTEM=emscripten&label=web" alt="TravisCI badge">
|
||||
</a>
|
||||
</p>
|
||||
|
Reference in New Issue
Block a user