On May 23, 2016, at 2:26 AM, Gavin Lambert
wrote: On 20/05/2016 22:51, Paul Fultz II wrote:
cget doesn’t do any magic. As it says in the readme, it just runs the equivalent of these commands on a package:
mkdir build cd build cmake .. cmake --build . cmake --build . --target install
This is what people already do to build and install something from cmake.
That's not going to work very well for a Boost library anyway, since they already contain a build subdirectory that is not intended to be an output directory. So the usual cmake trick of deleting the build directory to clean things will break the library.
cget doesn’t actually create the build directory in source to avoid these problem. Although it is quite common for users to build with cmake this way.
On the other hand, if you found the "root" CMakeLists.txt in build/ or in cmake/ first, and then run the above commands from that directory, then they would work as expected.
Except there is no way to know it is the ‘root’, except that it is at the ‘root’. Instead the user tells cget or cmake what the ‘root’ is instead of trying to guess.