MantisBT - CMake
View Issue Details
0015483CMakeCMakepublic2015-03-31 09:402015-11-02 09:13
marc.chevrier 
 
normalmajoralways
closedfixed 
WindowsWindows x647
CMake 3.2.1 
CMake 3.3CMake 3.3 
0015483: CMAKE_MAKE_PROGRAM not managed correctly with CMake/CPack
CMAKE_MAKE_PROGRAM is not propagated from CMake to CPack so preventing correct behavior if CMAKE_MAKE_PROGRAM refers to a program not the PATH

This problem does not occur with all generators but is perfectly reproductible with "NMake Makefiles JOM"
* jom.exe directory MUST NOT in PATH environment variable
* generation step: cmake -G "NMake Makefiles JOM" -DCMAKE_MAKE_PROGRAM=<path-to-jom-tool> <src>
* launch compilation: cmake --build . --target package

Result:
jom 1.0.14 - empower your cores
                                                           
Run CPack packaging tool...
CPack: Create package using TGZ
CPack: Install projects
CPack: - Run preinstall target for: CMAKE_CPACK_BUG
CPack Error: Problem running install command: "jom" "preinstall"
Please check D:/tests/cmake/build/_CPack_Packages/win64/TGZ/PreinstallOutput.log for errors
CPack Error: Error when generating package: CMAKE_CPACK_BUG
jom: D:\tests\cmake\build\Makefile [package] Error 1
attached is the CMakeLists.txt used to show problem.

I try to add to CPackConfig.cmake to set variable CPACK_CMAKE_MAKE_PROGRAM with correct value but problem is not solved.

Correct behavior expected : CMake/CPack must managed correctly and automatically variable CMAKE_MAKE_PROGRAM.
No tags attached.
txt CMakeLists.txt (271) 2015-03-31 09:40
https://public.kitware.com/Bug/file/5417/CMakeLists.txt
Issue History
2015-03-31 09:40marc.chevrierNew Issue
2015-03-31 09:40marc.chevrierFile Added: CMakeLists.txt
2015-03-31 10:37Brad KingNote Added: 0038371
2015-03-31 10:37Brad KingStatusnew => resolved
2015-03-31 10:37Brad KingResolutionopen => fixed
2015-03-31 10:37Brad KingFixed in Version => CMake 3.3
2015-03-31 10:37Brad KingTarget Version => CMake 3.3
2015-11-02 09:13Robert MaynardNote Added: 0039755
2015-11-02 09:13Robert MaynardStatusresolved => closed

Notes
(0038371)
Brad King   
2015-03-31 10:37   
Thanks. This should fix it:

 CPack: Fix make tool selection during preinstall
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93a3ec8b [^]
(0039755)
Robert Maynard   
2015-11-02 09:13   
Closing resolved issues that have not been updated in more than 4 months.