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.
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.