Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-13049

Expand environment variables in definition of CMake generator

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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"

        Attachments

          Activity

          Hide
          15knots Martin Weber added a comment -

          An unknown commit added variable expansion to the assembled cmake command-line.

          Show
          15knots Martin Weber added a comment - An unknown commit added variable expansion to the assembled cmake command-line.

            People

            • Assignee:
              15knots Martin Weber
              Reporter:
              aberent Anthony Berent
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: