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

          aberent Anthony Berent created issue -
          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.
          15knots Martin Weber made changes -
          Field Original Value New Value
          Assignee Martin Weber [ 15knots ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 143509 ] JNJira + In-Review [ 190592 ]
          15knots Martin Weber made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            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: