MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0014548 | CMake | CMake | public | 2013-11-06 11:05 | 2014-06-02 08:37 |
Reporter | Steve Wolak | ||||
Assigned To | Brad King | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | Windows | OS Version | 7 |
Product Version | CMake 2.8.12 | ||||
Target Version | CMake 3.0 | Fixed in Version | CMake 3.0 | ||
Summary | 0014548: Document CMAKE_MAKE_PROGRAM as preferred over CMAKE_BUILD_TOOL, not vice versa | ||||
Description | When 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 Reproduce | Leave 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 Information | I 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. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|