Hello,

I'm working on a project where some of our libs depend on custom build of some external libraries.
Those external libraries are managed through a repository manager similar to rpm (redhat package manager) which allows us to retrieve pre-compiled versions with related header files. (similar to devel packages)

The catch is we want libraries to be downloaded automatically to a shared (multiple users) local dir __AND__ we don't want them to be cleaned. (because another user could be using it).

I've tried add_custom_command but files disappear with make clean.
I've tried to set NO_CUSTOM_CLEAN, that works with make but not with ninja.

I've tried to chain add_custom_target to download the file and add_dependencies, again, this works with make but not with ninja (ninja does not know how to create protocol buffer compiler "protoc" for example since it's not the output of any command he knows)

I've tried externalproject_add with BUILD_BYPRODUCTS but it looks like ninja still clean the downloaded files.

Any idea on how to make ninja not clean those downloaded files (we use generators like protoc, libraries and header files)

With regards

David

PS : in my add_custom_command/add_custom_target, I invoke "cmake -P" on a custom cmake script with 2 args. The first arg is a file to test for existence, the second one is the parameter to our custom "rpm" to download the package.
-- 

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