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

look for MSVC 15.x toolchain

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Component/s: cmakebuilder-plugin
    • Labels:
      None
    • Environment:
      Windows with MSVC
    • Similar Issues:

      Description

      The generators for MSVC require that cl.exe is in the PATH, and the LIB and INCLUDE variables have been set up before invoking cmake. The cmakebuilder plugin cannot do that, so it cannot be used with the standalone toolchain.

      It would be great if the plugin would test whether the prerequisites are given, and look for the toolchain on its own if they are not.

        Attachments

          Activity

          Hide
          15knots Martin Weber added a comment -

          A workaround for MSVC is described in Martin Kutny`s blog.
          In short, it applies the effect of vcvarsall.bat as follows:

          1. Setup environment variables by running vcvarsall.bat,
          2. write all environment vars to a file,
          3. use the EnvInject Jenkins Plugin to read the file and pass the required variables to the whole build job.
          Show
          15knots Martin Weber added a comment - A workaround for MSVC is described in Martin Kutny`s blog . In short, it applies the effect of vcvarsall.bat as follows: Setup environment variables by running vcvarsall.bat , write all environment vars to a file, use the EnvInject Jenkins Plugin to read the file and pass the required variables to the whole build job.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: 15knots
          Path:
          src/main/resources/hudson/plugins/cmake/CmakeBuilder/help-generator.html
          http://jenkins-ci.org/commit/cmakebuilder-plugin/bfe1506a258e61d1fa6ed1a8905d7317500b7669
          Log:
          FIXED JENKINS-29142 (cannot be fixed, but mention workaround)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: 15knots Path: src/main/resources/hudson/plugins/cmake/CmakeBuilder/help-generator.html http://jenkins-ci.org/commit/cmakebuilder-plugin/bfe1506a258e61d1fa6ed1a8905d7317500b7669 Log: FIXED JENKINS-29142 (cannot be fixed, but mention workaround)
          Hide
          15knots Martin Weber added a comment -

          One possible solution would be to change the plugin to

          run a sub-shell (cmd.exe) which first runs the environment-setter-script (vcvarsall) and then runs cmake.

          There would be an input field in the UI that allows users to specify the path to the environment-setter-script.

          Let me know if this could be a better solution than the workaround.

           

          Show
          15knots Martin Weber added a comment - One possible solution would be to change the plugin to run a sub-shell (cmd.exe) which first runs the environment-setter-script (vcvarsall) and then runs cmake. There would be an input field in the UI that allows users to specify the path to the environment-setter-script. Let me know if this could be a better solution than the workaround.  

            People

            • Assignee:
              Unassigned
              Reporter:
              simonrichter Simon Richter
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: