[CMake] How to support separate debug and release build directories?
David Aldrich
david.aldrich.ntml at gmail.com
Fri Jun 21 10:28:48 EDT 2019
>
> > I would also like this to work if I use the make targets e.g. make
> > debug.
>
> I think that's outside the scope of the Makefile generator. For that
> generator, CMAKE_BUILD_TYPE is a configuration-wide setting. If you
> want a different configuration, you need a different build directory
> (where "build directory" is wherever you run cmake).
>
If I don't use make targets (so that user can type 'make debug' etc) the
build command would be more cumbersome:
cmake3 --build -D CMAKE_BUILD_TYPE=Debug .
What would best practice be to provide convenient commands for our
developers to easily build the target ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190621/df05e05a/attachment.html>
More information about the CMake
mailing list