-
Improvement
-
Resolution: Fixed
-
Minor
-
None
Expand environment variables in definition of CMake generator, so that one can set the generator to the value of an environment variable.
Justification:
I have a number of Jenkins jobs using CMake that are multi-configuration projects have to build on both Windows and Linux. Because the environments are different I have to use different CMake generators on Windows and Linux (CMake doesn't support "Unix Makefiles" on Windows or "Visual Studio 9 2008" on Linux). At the moment the only way to do this is to use conditional build steps. This means that I have to define everything about the CMake step twice. This would be much cleaner if I could set an environment variable in the node configuration (e.g. CMakeDefaultGenerator) and then set the "Makefile Generator" entry to ${CMakeDefaultGenerator} in the configuration of the CMake builder.
Environment variables already work in some of the other configuration fields of the CMake builder. For example on Windows I am setting my make command to "${Msbuild35Exe} /t:rebuild Project.sln"