[CMake] How to support separate debug and release build directories?

David Aldrich david.aldrich.ntml at gmail.com
Mon Jun 24 06:14:08 EDT 2019


>
> David,
>
>     I think a bit more explanation of the philosophy (at least how I
> interpret it) is needed. I see in your emails that you are “targeting
> makefiles”. With CMake you need to really stop thinking this way. Rarely do
> you need to target any specific build system (although those times do come
> up…). A lot of folks I see coming from autoconf to CMake still try to treat
> CMake in the same way. Don’t. There are a few golden rules with CMake that
> if you adhere to those will allow you to use CMake much easier.
>
>
>
> 1: NEVER have the Source directory and the Build directory be the same
> place.
>
> 2: PREFER out-of-source build directories (Not required but helpful)
>
> 3: Try not to target specific generators (makefiles, visual studio, xcode)
>
> <snip>
>

Hi Michael

Thanks very much for your reply and explanation. As a result, I now have
the separate Debug/Release build subdirectories working correctly.

Best regards

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190624/f7880dec/attachment.html>


More information about the CMake mailing list