title: CMake ExternalProject_Add proxy settings
body: <p>I have been quite successfully using CMake to perform builds using the <code>ExternalProject_Add</code> function, but my company recently put in a proxy server... Which has broken the aforementioned build scripts.</p>
  
  <p>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).</p>
  
  <p>I found this <a href="http://www.cmake.org/pipermail/cmake/2009-May/029533.html" rel="nofollow">post</a> on the CMake mailing-list. I thought maybe if it worked for the <code>file()</code> command it might work for the <code>ExternalProject_Add()</code> command. I set both <code>http_proxy</code> and <code>HTTP_PROXY</code> environment variables, but still received the same error. I have thought about overriding the <code>DOWNLOAD_COMMAND</code> argument with a <code>wget</code> call since this command seems to behave with the proxy settings. However, I wanted to know if there was a better way.</p>
  
  <p><strong>UPDATE 1:</strong> 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 <code>wget</code>.<br><br> <code>wget</code> shows the following output:</p>
  
  <pre><code>Resolving webproxy... 10.0.1.50 
  Connecting to webproxy|10.0.1.50|:80... connected. 
  Proxy request sent, awaiting response... 200 OK
  Download begins here...
  </code></pre>
  
  <p><strong>UPDATE 2:</strong> I have also noticed that both <code>apt-get</code> and <code>svn</code> fail with this new proxy setup, but <code>git</code> does not... <code>svn</code> complains about "Server sent unexpected return value (307 Proxy Redirect)..." Very confusing...</p>
  
  <p>Thanks!</p>