[CMake] Makefiles without reference to CMake?

Bello, Musodiq O (GE Healthcare) bello at ge.com
Wed Jul 6 11:31:21 EDT 2011


Thanks, Michael. But is there a way to make the references to CMake a relative path rather than an absolute path? This will allow us to bundle CMake with the source tree.

 

Thanks.

Musodiq

 

From: Michael Wild [mailto:themiwi at gmail.com] 
Sent: Saturday, July 02, 2011 1:19 AM
To: Bello, Musodiq O (GE Healthcare)
Cc: <cmake at cmake.org>
Subject: Re: [CMake] Makefiles without reference to CMake?

 

This has been discussed a gazillion times, and the answer will always be the same: no. It's impossible. A build tree always depends on CMake, and is not relocatable. Live with it.

 

If your users don't want to use CMake, provide them with a convenience script that does the hard work for them.

 

HTH

 

Michael

 


On 01.07.2011, at 23:43, "Bello, Musodiq O (GE Healthcare)" <bello at ge.com> wrote:

	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

	_______________________________________________
	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://www.cmake.org/mailman/listinfo/cmake

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110706/b60769ca/attachment-0001.htm>


More information about the CMake mailing list