View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014548CMakeCMakepublic2013-11-06 11:052014-06-02 08:37
ReporterSteve Wolak 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformWindowsOSWindowsOS Version7
Product VersionCMake 2.8.12 
Target VersionCMake 3.0Fixed in VersionCMake 3.0 
Summary0014548: Document CMAKE_MAKE_PROGRAM as preferred over CMAKE_BUILD_TOOL, not vice versa
DescriptionWhen attempting to configure for a JOM build system, JOM should be in the path. I find this acceptable, but also wanted a way for the users of our system to be able to specify where to find the JOM executable in another way. After looking at the CMake documentation I found CMAKE_MAKE_PROGRAM, which says:

"See CMAKE_BUILD_TOOL.
This variable is around for backwards compatibility, see CMAKE_BUILD_TOOL."

I allow the user to set an environment variable that points to the JOM executable. I then use this environment variable during generation of the JOM makefiles in the following way:

cmake -DCMAKE_TOOLCHAIN_FILE=<some value> -DCMAKE_BUILD_TOOL=<User provided information> -G "NMake Makefiles JOM".

I found this did not work for the configure step as CMake would fail to compile the test programs because it couldn't locate JOM. "Interesting", I thought. The cache certainly had CMAKE_BUILD_TOOL set as I expected it to. I then noticed that CMAKE_MAKE_PROGRAM was still set to just "jom". "Ah!". I modified my CMake command to be:

cmake -DCMAKE_TOOLCHAIN_FILE=<some value> -DCMAKE_MAKE_PROGRAM=<User provided information> -DCMAKE_BUILD_TOOL=<User provided information> -G "NMake Makefiles JOM" .

And the configure step worked correctly.

I believe that CMAKE_MAKE_PROGRAM should be set to CMAKE_BUILD_TOOL in the cache, or perhaps the documentation needs to be updated to state that it's used for the JOM generator, or maybe the step that checks that the compiler works needs to be updated to use CMAKE_BUILD_TOOL instead of CMAKE_MAKE_PROGRAM when generating JOM files.
Steps To ReproduceLeave JOM out of your path, but be sure to add the necessary information for Visual Studio (i.e. run vcvarsall.bat or similar script).

Attempt to run

cmake -DCMAKE_TOOLCHAIN_FILE=<some value> -DCMAKE_BUILD_TOOL=<Path to JOM, including executable> -G "NMake Makefiles JOM" .

Configure should fail. Clear the cache file then run:

cmake -DCMAKE_TOOLCHAIN_FILE=<some value> -DCMAKE_MAKE_PROGRAM=<Path to JOM, including executable> -DCMAKE_BUILD_TOOL=<Path to JOM, including executable> -G "NMake Makefiles JOM" .

Configure works
Additional InformationI would like to be able to pass the build tool to CMake at configure, but some clarification is needed on the correct way to do that.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0034404)
Brad King (manager)
2013-11-06 11:15

The documentation is clearly not representative of the current state of things:

$ git grep CMAKE_BUILD_TOOL v2.8.12 -- |wc -l
19
$ git grep CMAKE_MAKE_PROGRAM v2.8.12 -- |wc -l
116

It looks like someone tried to generalize the name from CMAKE_MAKE_PROGRAM to CMAKE_BUILD_TOOL at one point but it never stuck.
(0034480)
Brad King (manager)
2013-11-19 11:09

As part of a sweeping cleanup for CMAKE_MAKE_PROGRAM handling I revised the documentation to favor it over CMAKE_BUILD_TOOL:

 Prefer CMAKE_MAKE_PROGRAM over CMAKE_BUILD_TOOL
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ac75fdf [^]

See the commit message for further explanation.
(0036014)
Robert Maynard (manager)
2014-06-02 08:37

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-11-06 11:05 Steve Wolak New Issue
2013-11-06 11:15 Brad King Note Added: 0034404
2013-11-19 11:09 Brad King Note Added: 0034480
2013-11-19 11:10 Brad King Assigned To => Brad King
2013-11-19 11:10 Brad King Status new => resolved
2013-11-19 11:10 Brad King Resolution open => fixed
2013-11-19 11:10 Brad King Fixed in Version => CMake 3.0
2013-11-19 11:10 Brad King Target Version => CMake 3.0
2013-11-19 11:10 Brad King Summary CMAKE_MAKE_PROGRAM, not CMAKE_BUILD_TOOL used for verification of JOM during configure step => Document CMAKE_MAKE_PROGRAM as preferred over CMAKE_BUILD_TOOL, not vice versa
2014-06-02 08:37 Robert Maynard Note Added: 0036014
2014-06-02 08:37 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team