binji / binjgb

Gameboy emulator implemented in C, that also runs in the browser
https://binji.github.io/binjgb/
MIT License
534 stars 61 forks source link

Support Windows in build_tests.py #29

Closed AlvaroBurnett closed 4 years ago

AlvaroBurnett commented 4 years ago

Before this change, when build_tests.py was invoked under a Visual Studio command prompt, CMake would generate NMake makefiles by default, but then the script would call standard Make, which would fail because it doesn't understand NMake makefiles.

To fix this situation, when build_tests.py is invoked let's check if NMake exists. It it exists, let CMake generate NMake makefiles and then call NMake.

NOTE: Someone might suggest to tell CMake to always generate Unix Makefiles (even on Windows) and then call standard Make on them. Unfortunately that wouldn't work on Windows, because these makefiles would represent paths using forward slashes, and the Microsoft compiler wouldn't understand them.