[CMake] in source makefile / helper script that enables building out of source?
Konstantin Tokarev
annulen at yandex.ru
Wed May 11 10:01:23 EDT 2016
11.05.2016, 16:58, "Steve Lorimer" <steve.lorimer at gmail.com>:
> I've recently changed over from using boost-build (http://www.boost.org/build/) to cmake.
>
> Boost build builds in-source.
>
> I've become quite used to building and searching etc from the source root
>
>> ~/src $ b2 module
>> ~/src $ git grep foo
>
> This work flow has been broken because I'm not using out of source builds
>
>> ~/src/build $ make module
>> ~/src/build $ git grep... dang it! <ctrl-c>
>> ~/src/build $ cd ..
>> ~/src $ git grep foo
>> ~/src $ make modu... dang it! <ctrl-c>
>> ~/src $ cd build
>> ~/src/build $ make module
> I can't be the only one who wants to have the benefit of out of source builds and be able to build from in-source.
>
> I imagine it would be relatively simple to create a makefile which navigates to a known build directory (eg: build or debug or...), executes make there, and then changes directory back to where it was called from.
>
> Before I do just this, I thought it better to try leverage the open source community - hence asking the question.
>
> Does anyone have a script or makefile which does just this?
FYI, CMake supports in-source builds (however, particular projects may not)
>
> TIA
> Steve
> ,--
>
> 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
--
Regards,
Konstantin
More information about the CMake
mailing list