I’m using ExternalProject_Add to download a Git project that is a pre-requisite 
of my project. For the sake of the discussion I’ve wrapped OpenSSL and Boost in 
this manner placing tagged version of the source in my repo.

Building them isn’t really a problem, they run, take a long time compiling. The 
thing is, they should only compile once unless the tag changes. From the source 
it seems once you’ve used git you’ll always trigger the whole External Build 
sequence which is a pain since it is slow. So… I’ve been trying to create an 
external build just for the Git checkout and a second for the compilation. 
Which goes well enough, but I still need the glue to signal that he source is 
‘dirty’ and it should recompile the project.

The glue I’m trying to use is add_custom_command and add_custom_target, but 
add_custom_target seems… broken if only in concept. I’ve been trying to write a 
file to the system with the SHA tag and only touch it when it changes, but I 
cannot convince the ExternalProject that builds the library to not run.

Any tips that might make this work?
-- 

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:
https://cmake.org/mailman/listinfo/cmake

Reply via email to