[CMake] How to set the folder for intermediate files (like .obj)

Omar Valerio omar.valerio at gmail.com
Wed Mar 4 05:53:55 EST 2015


Hello Matthieu

I wouldn't recommend to mess around with the project folder structure in
CMake because targets down the line rely on finding those OBJ files at
exactly those locations. But what you can do, is that if you have a
particular requirement for the DEBUG and RELEASE to also contain the
respective OBJ, you can use a COPY command in CMake.  See for example:

http://stackoverflow.com/questions/9994045/copy-target-file-to-another-location-in-a-post-build-step-in-cmake

Best!

On Wed, Mar 4, 2015 at 10:46 AM, Matthieu Estrada <m.estrada at alpi.fr> wrote:

> Hello,
>
>
>
> I want to know if it’s possible to change the directory in CMake for the
> .obj files ?
>
>
>
> With the normal configuration CMake put object files in a folder like
> this :
>
>
>
> Project.dir/src/….
>
>
>
> Can I put this files in something like that :
>
>
>
> Project/Debug (for the debug .obj)
>
>
>
> And
>
>
>
> Project/Release (for the release .obj)
>
>
>
> Cordials,
>
> *Estrada Matthieu*
>
> Service Informatique / Intégration
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150304/f6537a4a/attachment.html>


More information about the CMake mailing list