Alternative: Install Windows Subsystem for Linux
The GNU compilers, make and Cmake are easily available for native Windows, as follows:
- Download MinGW-w64 compiler (gcc, g++ gfortran)
- Install it to
C:\mingwusing: Architecture: x86_64, Threads: posix, Exception: seh. This also installs
- For convenience, symlink
cd C:\mingw\bin mklink make.exe mingw32-make.exe
- install CMake
Using CMake on Windows
assuming you want your binaries put into
cd bin cmake -G "MinGW Makefiles" .. make
Note that on Windows, CMake defaults “make” to Visual Studio and Nmake.
cmake options above for Windows direct the build to MinGW.