Just to give back some info I've found:
* it's recommanded to use http_proxy (with lower case), because upper case will
be deprecated in last curl version:
"http_proxy is an exception as it is only available in lower case. " from
http://curl.haxx.se/docs/manpage.html
* here is the syntax for proxy with authentication:
http_proxy=login:passw...@host:port
*here is a little macro I use to deal with http errors (which return no error!):
#DOWNLOAD() aims to correct bug from "file(download..." which don't deal with
http errors
MACRO(FILE_DOWNLOAD url filename error_code error_message)
file(DOWNLOAD ${url} ${filename} STATUS DOWNLOAD_STATUS LOG DOWNLOAD_LOG)
#message(STATUS "STATUS=${DOWNLOAD_STATUS} LOG=${DOWNLOAD_LOG}")
LIST(GET DOWNLOAD_STATUS 0 ${error_code})
LIST(GET DOWNLOAD_STATUS 1 ${error_message})
IF(${error_code} EQUAL 0) #look for http error if any
string(REGEX MATCH "HTTP/1.[0-9] [0-9][0-9][0-9] [a-zA-Z ]*"
${error_message} ${DOWNLOAD_LOG})
string(REGEX MATCH "[0-9][0-9][0-9]" ${error_code} ${${error_message}})
string(REGEX REPLACE "HTTP/1.[0-9] [0-9][0-9][0-9] " "" ${error_message}
${${error_message}})
IF(${error_code} EQUAL 200)
set(${error_code} 0)
ENDIF(${error_code} EQUAL 200)
ENDIF(${error_code} EQUAL 0)
IF(NOT (${error_code} EQUAL 0)) #remove partial file if any error
file(REMOVE ${filename})
ENDIF(NOT (${error_code} EQUAL 0))
#message(STATUS "error_code=${${error_code}}")
#message(STATUS "error_message=${${error_message}}")
ENDMACRO(FILE_DOWNLOAD)
Laposte.net, Messager Officiel du Rallye des Gazelles 2010, Pour suivre le
Rallye Aicha des Gazelles et soutenir les participantes,
cliquez ici http://www.laposte.net/rallye-des-gazelles
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake