[CMake] Makefiles without reference to CMake?

Bello, Musodiq O (GE Healthcare) bello at ge.com
Fri Jul 1 17:43:46 EDT 2011


Hello,

 

I used cmake to build a project and it runs fine on my Linux box as part
of a bigger app. But I need to be able to check in the Makefiles along
with my code, so that other users don't need to perform the cmake
configuration all over. The problem is that the Makefiles generated by
cmake have references to the cmake executable. The Makefiles include
lines such as

CMakeFiles/Makefile2:   $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR)
-B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0

libmed/Makefile:       cd .. && $(CMAKE_COMMAND) -E cmake_progress_start
/musodiq/med/medbuild/arch/linux64/CMakeFiles
/musodiq/medbuild/arch/linux64/libmed/CMakeFiles/progress.marks

libmed/Makefile:       cd .. && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR)
-B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0

where CMAKE_COMMAND is hardcoded as my local installation of cmake. This
makes it difficult to simply use the Makefiles on another computer
directly from a cvs/svn checkout.

What can I do to avoid any dependence on cmake once the Makefiles are
generated? How can I skip execution of lines such as the above during a
gmake build? If there's no way to avoid dependence on cmake, how can I
specify the path to cmake to be relative so that I can put cmake as part
of the project to be checked out?

Thanks for your help.

Musodiq

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110701/474517eb/attachment.htm>


More information about the CMake mailing list