[CMake] Enabling Fortran only builds with Cmake 3.10.2 on Windows
Belcourt, Kenneth
kbelco at sandia.gov
Fri Mar 23 16:54:21 EDT 2018
Hi,
I have a project that builds fine on Mac and Linux by disabling C/C++ and building with only Fortran.
PROJECT(Noel LANGUAGES Fortran)
When I try to build on Windows, it seems that CMake is looking for variable VCTargetsPath, here’s the error:
Setting environment for using Microsoft Visual Studio Shell 13.0 x64 tools.
CMake Error at CMakeLists.txt:3 (PROJECT):
Failed to run MSBuild command:
C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe
to get the value of VCTargetsPath:
This looks like a Visual C variable which is not installed on this system. Is CMake looking in the registry for this variable or is it MSBuild.exe? I’m not very Windows conversant so I could be completely off base here. Note that I’ve installed Intel Fortran 17.0.4 and have run the ifortvars.bat file for arch intel64.
Noel Belcourt
More information about the CMake
mailing list