<div dir="ltr"><div dir="ltr">Le ven. 21 juin 2019 à 11:40, Michael Jackson <<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>> a écrit :<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_-3358577163581508200WordSection1"><p class="MsoNormal"><br></p><p class="MsoNormal">   cd Foo<u></u><u></u></p><p class="MsoNormal">   mkdir Debug && cd Debug<u></u><u></u></p><p class="MsoNormal">   cmake -DCMAKE_BUILD_TYPE=Debug ../<u></u><u></u></p><p class="MsoNormal">   make -j<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">We have just created a Debug build in the Debug Directory. Now, the same is analogous for the Release build.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Cd Foo<u></u><u></u></p><p class="MsoNormal">Mkdir Release && cd Release<u></u><u></u></p><p class="MsoNormal">Cmake -DCMAKE_BUILD_TYPE=Release ../<u></u><u></u></p><p class="MsoNormal">Make -j<u></u><u></u></p><p class="MsoNormal"><u></u> </p></div></div></blockquote><div><br></div><div>Or, from CMake 3.13, simpler:</div><div><br></div><div>cd foo</div><div>cmake -B release/ -DCMAKE_BUILD_TYPE=Release </div><div>cmake -B debug/ -DCMAKE_BUILD_TYPE=Debug </div>make -j -C build & make -j -C debug</div><div class="gmail_quote"><br class="gmail-Apple-interchange-newline"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_-3358577163581508200WordSection1"><div><div><div><p class="MsoNormal"> I am not finding it easy to find 'patterns' for these sort of issues. I would have thought that configuring a project with separate debug and release directories would be quite typical. But it's hard to find the recommended way of doing such things. </p></div></div></div></div></div></blockquote><div><br></div><div>It is typical: <a href="https://gitlab.kitware.com/cmake/community/wikis/FAQ#what-is-an-out-of-source-build">https://gitlab.kitware.com/cmake/community/wikis/FAQ#what-is-an-out-of-source-build</a></div><div><br></div><div>In this case CMake doesn't recommend anything because it assumes this is implemented outside/on top of CMake</div><div><a href="https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html">https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html</a><br></div><div><br></div><div>Marc</div></div></div>