Status: Closed (View Workflow)
cmakebuilder-plugin version 2.0
Latest version of cmakebuilder-plugin tries to extract the cmake-variable 'CMAKE_BUILD_TOOL' from the generated file 'CMakeCache.txt'.
The latest version of cmake v 3.0.2 uses the cache variable 'CMAKE_MAKE_PROGRAM' instead (see http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_MAKE_PROGRAM.html#variable:CMAKE_MAKE_PROGRAM). It does no longer use the old variable name (see http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_BUILD_TOOL.html) and doesn't write the old variable back into the file 'CMakeCache.txt'.
So the build fails, because the plugin cannot extract the old variable from the cache.
The Visual Studio generators set this to the full path to MSBuild.exe (VS >= 10), devenv.com (VS 7,8,9), VCExpress.exe (VS Express 8,9), or msdev.exe (VS 6). (See also variables CMAKE_VS_MSBUILD_COMMAND, CMAKE_VS_DEVENV_COMMAND, and CMAKE_VS_MSDEV_COMMAND.)
These generators prefer to lookup the build tool at build time rather than to store CMAKE_MAKE_PROGRAM in the CMake cache ahead of time. This is because the tools are version-specific and can be located using the Windows Registry.
We downgraded to 1.10 because it works as expected.
Maybe an option could be added to disable the CMAKE_MAKE_PROGRAM, because we manually call: '"C:\Program Files (x86)\CMake\bin\cmake.exe" --build . --config Release'
??The Visual Studio generators set this to the full path to MSBuild.exe (VS >= 10), ??
Unfortunately,, they do not set CMAKE_MAKE_PROGRAM at generation time.
??Maybe an option could be added to disable the CMAKE_MAKE_PROGRAM, because we manually call: '"C:\Program Files (x86)\CMake\bin\cmake.exe" --build ??
I already did implement solution 1, see
It should do what you need (see screenshot above ), but just needs testing on windows before releasing.
Would you do try it out?
Code changed in jenkins
JENKINS-29267CMAKE_BUILD_TOOL: added online doc according to solution