On 26/11/2015 17:16, KatolaZ wrote:
On Thu, Nov 26, 2015 at 05:04:41PM +0000, Roger Leigh wrote:
On 26/11/2015 15:00, Svante Signell wrote:
On Thu, 2015-11-26 at 15:33 +0100, aitor_czr wrote:
I agree with you: using "cd build; cmake ../" with *the final purpose* of
installing the spinner in the system is a contorsionism.

Not really, it's directly analogous to VPATH builds with make (and
configuring from a separate build dir with the autotools).  It lets
you cleanly separate source and build (and have multiple build
trees).  It also makes cleaning the build tree nothing more than
removing the build tree.

(I use this feature of cmake all the time--source in a git tree on
an NFS-exported filesystem, with build trees on several different
systems so I can build and test on multiple platforms at once.)


Sorry but I don't understand. Are you suggesting that the only way to
separate build and source with cmake is to ask the user to manually
create the "build" directory, chdir into it and launch "cmake ../"? In
other words, that cmake does not allow to do otherwise?

That's correct. You can put the build directory anywhere you like. But, you do need to chdir to the build directory before running "cmake /path/to/source", just as you do when running "/path/to/configure" with autoconf. You can of course run "cmake .", and have the source and build directories be the same, but then there's no separation and you end up writing the cache file to the source tree (which can cause problems for any future out-of-source builds since it will be reused).


Regards,
Roger

_______________________________________________
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to