Hello, 

I use the ExternalProjet_Add function to download and install third-party 
libraries. 
Here is an example of a CMakeLists file containing such a call: 

===================================== 
cmake_minimum_required (VERSION 2.6) 

project (example CXX) 

set(CMAKE_VERBOSE_MAKEFILE ON) 

include(ProcessorCount) 
ProcessorCount(N) 
if(NOT N EQUAL 0) 
set(CMAKE_BUILD_FLAGS -j${N}) 
endif() 

include(ExternalProject) 
set(EXTERNAL_DIR ${CMAKE_CURRENT_BINARY_DIR}) 
ExternalProject_Add(eigen 
PREFIX ${EXTERNAL_DIR}/eigen 
DOWNLOAD_DIR ${EXTERNAL_DIR}/eigen/download 
SOURCE_DIR ${EXTERNAL_DIR}/eigen/src 
BINARY_DIR ${EXTERNAL_DIR}/eigen/build 
STAMP_DIR ${EXTERNAL_DIR}/eigen/stamp 
INSTALL_DIR ${EXTERNAL_DIR}/eigen/install 
URL http://bitbucket.org/eigen/eigen/get/3.2.4.tar.gz 
URL_MD5 4d0d77e06fef87b4fcd2c9b72cc8dc55 
CMAKE_ARGS -D CMAKE_INSTALL_PREFIX=<INSTALL_DIR> 
) 

===================================== 

Everything works fine, except after calling "make clean". 
Thanks to URL_MD5, the third-party library is not downloaded again. 
However, configuration, build and install steps are performed again whereas the 
library has not been uninstalled during cleaning. 

How could I tell to ExternalProject_Add not to configure/build/install my 
library unless this library has been removed from my computer? 

Thank you very much for your help! 

Cédric 





-- 

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