Le 27.09.17 à 19:10, Egor Pugin a écrit :
The idea is to include several "packages" (one package ~ one project in Boost) and make
those available to the build, exactly as for a regular CMakeLists.txt that adds several directories
or subprojects through a sequence of calls to "add_directories".
However, the difference here is that "packages" have inter-dependencies, and the order of
the "add_directories" should honor those dependencies.
I solved the issue of including several dirs (via 'add_directories')
using guards 'if (TARGET name); return(); endif()' in my pkg manager.
See boost libraries there: https://cppan.org/search?q=boost
Each library can be included to project separately with autoincluding
required deps for it.
Hi,
Thank you for your answer. What you did with CPAN is wonderful, but I
think this much more than what my humble scripts are trying to address.
Also the guard mechanism does not really address the issue of ordering
the add_directories in some topological order. In particular, you guard
because you do not want to declare several times the same target, but it
does not tell when to include any other dependencies your target may have.
In summary (correct me if I am wrong) what this does is (in some pseudo
code):
---------
if(target1, target2 ... already defined)
return
declare target1, target2 ...
target_dependencies target1, target1.1, target1.2 ...
target_dependencies target2, target2.1, target2.2 ...
---------
but it does not tell when to declare target1.1, target1.2 ... and this
knowledge should be encoded somewhere else in your scripts.
Best,
Raffi
--
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-developers