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
          derphilipp Philipp Weißmann added a comment -

          I have this very same problem and committed a pull-request on github: https://github.com/jenkinsci/cmakebuilder-plugin/pull/5

          Show
          derphilipp Philipp Weißmann added a comment - I have this very same problem and committed a pull-request on github: https://github.com/jenkinsci/cmakebuilder-plugin/pull/5
          Hide
          pobinger Gerhard Pobinger added a comment -

          Inserting the following lines into the CMakeLists.txt worked for me as a quick workaround from the cmake-side:

          if(CMAKE_MAKE_PROGRAM)
          set(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM}
          CACHE STRING "workaround for jenkins cmake-plugin")
          endif()

          This should work until it may be fixed in one of the next versions of the cmake-plugin...

          Show
          pobinger Gerhard Pobinger added a comment - Inserting the following lines into the CMakeLists.txt worked for me as a quick workaround from the cmake-side: if(CMAKE_MAKE_PROGRAM) set(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE STRING "workaround for jenkins cmake-plugin") endif() This should work until it may be fixed in one of the next versions of the cmake-plugin...
          Hide
          15knots Martin Weber added a comment -

          Thanks for the pull request, Philipp.
          Unfortunately, it also changes the name of the Jenkins environment variable
          CMAKE_BUILD_TOOL which will (again) break users´ jobs.

          Show
          15knots Martin Weber added a comment - Thanks for the pull request, Philipp. Unfortunately, it also changes the name of the Jenkins environment variable CMAKE_BUILD_TOOL which will (again) break users´ jobs.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: 15knots
          Path:
          src/main/java/de/marw/cmake/cmakecache/SimpleCMakeCacheTxt.java
          src/main/java/hudson/plugins/cmake/BuildToolEntryParser.java
          src/main/java/hudson/plugins/cmake/CmakeBuilder.java
          src/main/resources/hudson/plugins/cmake/CmakeBuilder/help-generator.html
          http://jenkins-ci.org/commit/cmakebuilder-plugin/294564856425049b316f2ba75c23fab8c50e5496
          Log:
          [FIXED JENKINS-29267] CMAKE_BUILD_TOOL is deprecated in cmake version
          3.0

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: 15knots Path: src/main/java/de/marw/cmake/cmakecache/SimpleCMakeCacheTxt.java src/main/java/hudson/plugins/cmake/BuildToolEntryParser.java src/main/java/hudson/plugins/cmake/CmakeBuilder.java src/main/resources/hudson/plugins/cmake/CmakeBuilder/help-generator.html http://jenkins-ci.org/commit/cmakebuilder-plugin/294564856425049b316f2ba75c23fab8c50e5496 Log: [FIXED JENKINS-29267] CMAKE_BUILD_TOOL is deprecated in cmake version 3.0
          Hide
          derphilipp Philipp Weißmann added a comment -

          The workaround provided by Martin works perfectly for me;
          Thank you very much for your input!

          Show
          derphilipp Philipp Weißmann added a comment - The workaround provided by Martin works perfectly for me; Thank you very much for your input!
          Hide
          adrow Anthony Drow added a comment -

          I'm continuing to get this error even though it appears to have been resolved. I've downloaded the most recent version of cmakebuilder (version 2.1) which is supposed to have fixed this issue, yet I continue to get the error "Failed to get CMAKE_MAKE_PROGRAM value from C:\Users\580152\Celero\build\64\CMakeCache.txt". I'm currently using Cmake version 3.2.3 and Jenkins 1.617. I've tried uninstalling and reinstalling the plugin, but that hasn't helped either. Any and all help to get this fixed is much appreciated.

          Show
          adrow Anthony Drow added a comment - I'm continuing to get this error even though it appears to have been resolved. I've downloaded the most recent version of cmakebuilder (version 2.1) which is supposed to have fixed this issue, yet I continue to get the error "Failed to get CMAKE_MAKE_PROGRAM value from C:\Users\580152\Celero\build\64\CMakeCache.txt". I'm currently using Cmake version 3.2.3 and Jenkins 1.617. I've tried uninstalling and reinstalling the plugin, but that hasn't helped either. Any and all help to get this fixed is much appreciated.
          Hide
          15knots Martin Weber added a comment -

          Are you using msbuild?
          If so, you might have hit JENKINS-29329
          <https://issues.jenkins-ci.org/browse/JENKINS-29329>

          Show
          15knots Martin Weber added a comment - Are you using msbuild? If so, you might have hit JENKINS-29329 < https://issues.jenkins-ci.org/browse/JENKINS-29329 >
          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
          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
          15knots Martin Weber added a comment -

          V 2.2 preview

          Show
          15knots Martin Weber added a comment - V 2.2 preview
          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 -

          Verified by JENKINS-29329

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

            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: