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

CMAKE_BUILD_TOOL is deprecated in cmake version 3.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: cmakebuilder-plugin
    • Labels:
      None
    • Environment:
      cmakebuilder-plugin version 2.0
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          15knots Martin Weber added a comment -

          Verified by JENKINS-29329

          Show
          15knots Martin Weber added a comment - Verified by JENKINS-29329
          Hide
          15knots Martin Weber added a comment - - edited

          ??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
          https://issues.jenkins-ci.org/browse/JENKINS-29329?focusedCommentId=232231&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-

          It should do what you need (see screenshot above ), but just needs testing on windows before releasing.
          Would you do try it out?

          Show
          15knots Martin Weber added a comment - - edited ??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 https://issues.jenkins-ci.org/browse/JENKINS-29329?focusedCommentId=232231&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment- It should do what you need (see screenshot above ), but just needs testing on windows before releasing. Would you do try it out?
          Hide
          15knots Martin Weber added a comment -

          V 2.2 preview

          Show
          15knots Martin Weber added a comment - V 2.2 preview
          Hide
          roman80 Roman80 added a comment - - edited

          From http://www.cmake.org/cmake/help/v3.3/variable/CMAKE_MAKE_PROGRAM.html:

          ...
          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'

          Show
          roman80 Roman80 added a comment - - edited From http://www.cmake.org/cmake/help/v3.3/variable/CMAKE_MAKE_PROGRAM.html: ... 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'
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: 15knots
          Path:
          src/main/resources/hudson/plugins/cmake/BuildToolStep/config.jelly
          src/main/resources/hudson/plugins/cmake/BuildToolStep/help-args.html
          src/main/resources/hudson/plugins/cmake/BuildToolStep/help-envVars.html
          src/main/resources/hudson/plugins/cmake/BuildToolStep/help-withCmake.html
          src/main/resources/hudson/plugins/cmake/CmakeBuilder/config.jelly
          src/main/resources/hudson/plugins/cmake/CmakeBuilder/help-generator.html
          src/main/resources/hudson/plugins/cmake/CmakeBuilder/help-runTool.html
          src/main/resources/hudson/plugins/cmake/CmakeBuilder/help.html
          http://jenkins-ci.org/commit/cmakebuilder-plugin/995633bce33e8b934b2eae6781ec179bf220cf41
          Log:
          JENKINS-29267 CMAKE_BUILD_TOOL: added online doc according to solution
          #1

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: 15knots Path: src/main/resources/hudson/plugins/cmake/BuildToolStep/config.jelly src/main/resources/hudson/plugins/cmake/BuildToolStep/help-args.html src/main/resources/hudson/plugins/cmake/BuildToolStep/help-envVars.html src/main/resources/hudson/plugins/cmake/BuildToolStep/help-withCmake.html src/main/resources/hudson/plugins/cmake/CmakeBuilder/config.jelly src/main/resources/hudson/plugins/cmake/CmakeBuilder/help-generator.html src/main/resources/hudson/plugins/cmake/CmakeBuilder/help-runTool.html src/main/resources/hudson/plugins/cmake/CmakeBuilder/help.html http://jenkins-ci.org/commit/cmakebuilder-plugin/995633bce33e8b934b2eae6781ec179bf220cf41 Log: JENKINS-29267 CMAKE_BUILD_TOOL: added online doc according to solution #1

            People

            Assignee:
            15knots Martin Weber
            Reporter:
            pobinger Gerhard Pobinger
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: