Re: [CMake] in source makefile / helper script that enables building out of source?
On 11-May-16 16:58, Steve Lorimer wrote: 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! ~/src/build $ cd .. ~/src $ git grep foo ~/src $ make modu... dang it! ~/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. Will `-C` help? ~/src $ make -C build module or in cross-platform fashion: ~/src $ cmake --build build ~/src $ cmake --build build --target foo --config Debug Ruslo 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? 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
Re: [CMake] in source makefile / helper script that enables building out of source?
On Wed, 2016-05-11 at 09:06 -0500, Steve Lorimer wrote: > I am aware of being able to do in-source builds, but would like to > continue to reap the benefits of out-of-source builds whilst being > able to build from in-source Make a shell function or shell script to run your build, that does the cd to the build directory and starts the build. -- 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
Re: [CMake] in source makefile / helper script that enables building out of source?
On 11 May 2016 at 09:01, Konstantin Tokarevwrote: > > FYI, CMake supports in-source builds (however, particular projects may not) > Thanks for your response! I am aware of being able to do in-source builds, but would like to continue to reap the benefits of out-of-source builds whilst being able to build from in-source -- 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
Re: [CMake] in source makefile / helper script that enables building out of source?
11.05.2016, 16:58, "Steve Lorimer": > 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! >> ~/src/build $ cd .. >> ~/src $ git grep foo >> ~/src $ make modu... dang it! >> ~/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 -- 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
[CMake] in source makefile / helper script that enables building out of source?
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! ~/src/build $ cd .. ~/src $ git grep foo ~/src $ make modu... dang it! ~/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? 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