The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=14548 ====================================================================== Reported By: Steve Wolak Assigned To: ====================================================================== Project: CMake Issue ID: 14548 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2013-11-06 11:05 EST Last Modified: 2013-11-06 11:05 EST ====================================================================== Summary: CMAKE_MAKE_PROGRAM, not CMAKE_BUILD_TOOL used for verification of JOM during configure step 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. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2013-11-06 11:05 Steve Wolak New Issue ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
