Ok it seems the answer to my problem is here: http://www.cmake.org/pipermail/cmake/2010-December/041295.html I will try it.
----- Mail original ----- > De: "Cedric Doucet" <[email protected]> > À: [email protected] > Envoyé: Samedi 18 Avril 2015 13:38:31 > Objet: Re: [CMake] Don't download external projects again after calling "make > clean" > > > I have just tried to install curl to get https support. > To do that, I have followed the steps below: > > 1. Installation of openssl: > 1.a. ./config --prefix=/my/openssl/path > 1.b. make > 1.c. make test > 1.d. make install > 2. Installation of curl > 2.a. ./configure --prefix=/my/curl/path --with-ssl=/my/openssl/path/lib > 2.b. make > 2.c. make install > > I have also prepend PATH with /my/curl/path/bin. > However, the error remains. > It seems that my version of curl (7.41.0) is not taken into acount because I > have still this line in the error message: > User-Agent: curl/7.38.0 > I tried to remove all previous of curl and libcurl but it does not change > anything. > > Could you help me? > > Cédric > > > ----- Mail original ----- > > De: "Cedric Doucet" <[email protected]> > > À: "David Cole" <[email protected]> > > Cc: [email protected] > > Envoyé: Samedi 18 Avril 2015 13:00:28 > > Objet: Re: [CMake] Don't download external projects again after calling > > "make clean" > > > > > > Hello David, > > > > thank you very much. > > Unfortunately, I get the following error message if I remove my download > > command: > > > > -- downloading... > > src='http://bitbucket.org/eigen/eigen/get/3.2.4.tar.gz' > > dst='/home/cdoucet/Downloads/eigen/download/3.2.4.tar.gz' > > timeout='none' > > -- [download 100% complete] > > CMake Error at src/eigen-stamp/download-eigen.cmake:27 (message): > > error: downloading 'http://bitbucket.org/eigen/eigen/get/3.2.4.tar.gz' > > failed > > > > status_code: 1 > > status_string: "Unsupported protocol" > > log: Hostname was NOT found in DNS cache > > Trying 131.103.20.167... > > > > Connected to bitbucket.org (131.103.20.167) port 80 (#0) > > > > GET /eigen/eigen/get/3.2.4.tar.gz HTTP/1.1 > > > > User-Agent: curl/7.38.0 > > > > Host: bitbucket.org > > > > Accept: */* > > > > > > > > HTTP/1.1 301 Moved Permanently > > > > Server nginx/1.6.2 is not blacklisted > > > > Server: nginx/1.6.2 > > > > Date: Sat, 18 Apr 2015 10:55:20 GMT > > > > Content-Type: text/html > > > > Content-Length: 184 > > > > Location: https://bitbucket.org/eigen/eigen/get/3.2.4.tar.gz > > > > > > > > Ignoring the response-body > > > > <html> > > > > <head><title>301 Moved Permanently</title></head> > > > > <body bgcolor="white"> > > > > <center><h1>301 Moved Permanently</h1></center> > > > > <hr><center>nginx/1.6.2</center> > > > > </body> > > > > </html> > > > > Connection #0 to host bitbucket.org left intact > > > > Issue another request to this URL: > > 'https://bitbucket.org/eigen/eigen/get/3.2.4.tar.gz' > > > > Protocol "https" not supported or disabled in libcurl > > > > Closing connection -1 > > > > > > > > > > ----- Mail original ----- > > > De: "David Cole" <[email protected]> > > > À: "Cedric Doucet" <[email protected]> > > > Cc: [email protected] > > > Envoyé: Vendredi 17 Avril 2015 13:21:08 > > > Objet: Re: [CMake] Don't download external projects again after calling > > > "make clean" > > > > > > Eliminate your DOWNLOAD_COMMAND. CMake knows how to do it with just > > > the URL_MD5, DOWNLOAD_DIR and SOURCE_DIR information.... > > > > > > HTH, > > > David > > > > > > > > > On Fri, Apr 17, 2015 at 1:32 AM, Cedric Doucet <[email protected]> > > > wrote: > > > > > > > > Hello David, > > > > > > > > thank you very much for your help. > > > > > > > > Unfortunately I may do something wrong because it does not work. > > > > After cleaning, the library is downloaded again. > > > > > > > > I guess my mistake comes from the fact I do not understand the role of > > > > URL_MD5. > > > > Below is a simple example where downloading and installing is very > > > > fast. > > > > You just have to replace the value of EXTERNAL_DIR by the path to your > > > > own > > > > "Downloads" repository. > > > > I tried to put URL in my DOWNLOAD_COMMAND but the call "wget <URL>" > > > > does > > > > not seem to be understood by the wget command. > > > > > > > > Thanks again! > > > > > > > > Cédric > > > > > > > > -------------------------------------------------------------------------- > > > > 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 /home/cdoucet/Downloads) > > > > 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 > > > > INSTALL_DIR ${EXTERNAL_DIR}/eigen/install > > > > URL > > > > http://bitbucket.org/eigen/eigen/get/3.2.4.tar.gz > > > > URL_MD5 ccb18a771f678b38a3d33c321a8e7daf > > > > DOWNLOAD_COMMAND wget > > > > http://bitbucket.org/eigen/eigen/get/3.2.4.tar.gz > > > > && > > > > tar xvzf 3.2.4.tar.gz -C <SOURCE_DIR> > > > > --strip-components=1 > > > > CONFIGURE_COMMAND cd <BINARY_DIR> && cmake -D > > > > CMAKE_INSTALL_PREFIX=$<INSTALL_DIR> <SOURCE_DIR> > > > > ) > > > > ------------------------------------------------------------------------------ > > > > > > > > > > > > > > > > ----- Mail original ----- > > > >> De: "David Cole" <[email protected]> > > > >> À: "Cedric Doucet" <[email protected]> > > > >> Cc: [email protected] > > > >> Envoyé: Lundi 13 Avril 2015 12:40:34 > > > >> Objet: Re: [CMake] Don't download external projects again after > > > >> calling > > > >> "make clean" > > > >> > > > >> Use the URL_MD5 and DOWNLOAD_DIR arguments to ExternalProject_Add to > > > >> put the downloaded files into a location outside the build tree > > > >> (perhaps ~/Downloads on Mac/Linux or $ENV{USERPROFILE}/Downloads on > > > >> Windows). > > > >> > > > >> With DOWNLOAD_DIR outside the build tree, and the checksums of the > > > >> downloaded files being the same as you've specified via URL_MD5, the > > > >> download portion will be avoided once there is a local copy of a file > > > >> available. > > > >> > > > >> > > > >> HTH, > > > >> David C. > > > >> > > > >> > > > >> On Mon, Apr 13, 2015 at 5:04 AM, Cedric Doucet > > > >> <[email protected]> > > > >> wrote: > > > >> > > > > >> > Hello! > > > >> > > > > >> > I use the ExternalProject_Add function to download third-party > > > >> > libraries > > > >> > of > > > >> > a code. > > > >> > > > > >> > Once a library has been downloaded, I can call "make" as many times > > > >> > as > > > >> > I > > > >> > want without downloading this library again. > > > >> > It seems that CMake detects that the library has already been > > > >> > downloaded. > > > >> > > > > >> > However, calling "make clean" seems to destroy this feature. > > > >> > Even if my library is not uninstalled during cleaning, calling > > > >> > "make" > > > >> > after > > > >> > "make clean" will lead CMake to try download the library again. > > > >> > > > > >> > How could I tell CMake not to download the library again? > > > >> > > > > >> > 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 > > > >> > > > > > -- > > > > 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 > > > -- > > 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 > -- 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
