On Tue, Dec 12, 2017 at 5:13 AM, Harry Mallon <Harry.Mallon@codex.online>
wrote:

> Hello all,
>
> Has anyone got any good recommendations for the following setup?
>
> “large_repo” contains code for a binary and two git submodules. One is
> “library” which is added with add_subdirectory(). The other is some common
> library “util_library” (something like gtest which is generally useful)
> which is added as a git submodule with add_subdirectory(). “library” also
> needs “util_library” which is added to its repo in the same git submodule
> style.
>
> It is possible to namespace the names in an add_subdirectory call? Or
> something like that? Or maybe I should go back to the install and
> find_package() methods I used to use?
>
> ========
> └── large_repo
>     ├── library
>     │   └── util_library
>     └── util_library
> ========
>

It won't really help you right now, but this is a classic scenario that the
new FetchContent module
<https://cmake.org/cmake/help/git-master/module/FetchContent.html> would
address. It's not part of CMake 3.10 but it is on master and should be
available from CMake 3.11 when it is eventually released.


-- 
Craig Scott
Melbourne, Australia
https://crascit.com
-- 

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

Reply via email to