CMake ExternalProject_Add proxy settings

I have been quite successfully using CMake to perform builds using the ExternalProject_Add function, but my company recently put in a proxy server... Which has broken the aforementioned build scripts.

The download step fails during the extract phase because the tarball that was downloaded is only the redirect request from the proxy server (at least I think this is what is contained in the tiny tarball it acquires).

I found this post on the CMake mailing-list. I thought maybe if it worked for the file() command it might work for the ExternalProject_Add() command. I set both http_proxy and HTTP_PROXY environment variables, but still received the same error. I have thought about overriding the DOWNLOAD_COMMAND argument with a wget call since this command seems to behave with the proxy settings. However, I wanted to know if there was a better way.

UPDATE 1: I checked the contents of the small tarball, and it does contain HTML; however, it is a notification that Authentication is required. I'm not sure why it is requiring authentication because I haven't had to enter any login information for wget. wget shows the following output:

Resolving webproxy... 
Connecting to webproxy||:80... connected. 
Proxy request sent, awaiting response... 200 OK
Download begins here...

UPDATE 2: I have also noticed that both apt-get and svn fail with this new proxy setup, but git does not... svn complains about "Server sent unexpected return value (307 Proxy Redirect)..." Very confusing...



What version of CMake are you using? The file(DOWNLOAD command started using the follow redirect flag in version 2.8.2, introduced by the following commit:;a=commitdiff;h=ef491f78218e255339278656bf6dc26073fef264

Using a custom DOWNLOAD_COMMAND is certainly a reasonable workaround.

Need Your Help

Using not equal operator in Cakephp

php cakephp cakephp-1.3

I have find query that looks like this.

Menu link not working properly on iPad

jquery html css ipad menu

I've got a "sticking to the top" menu in this website:

Delete Item GridView Windows 8 Metro

c# xaml microsoft-metro

I an trying to delete items from a GridView control. When I click delete, the GridView fails to update