[CMake] ExternalProject - Guarantee use of same third party library

Olivier Pierard olivier.pierard at cenaero.be
Thu Oct 2 04:26:21 EDT 2014


Dear all,

I'm trying to set up an ExternalProject.  Typically, the main project as 
well as the ExternalProject are depending/using a same third party 
library (e.g.: boost) and I would like to guarantee that the same 
version of it of used on both sides.

What's the best solution:
* Use two find_package (one in each project) using the same BOOST_ROOT 
(how to guarantee this ?)
* Retrieve the BOOST_INCLUDE_DIR/BOOST_LIBRARIES from the cache of the 
externalproject (how to do it ? Is this already known at configure step 
of main project ? )
* Something else...

Thank you for your help,

Olivier




More information about the CMake mailing list