Hi Aaron, <br><br>Not sure if ti will help, but .... <br>Have you looked at using ExternalProject.cmake to checkout, configure and build project using CMake ? <br><br>Hth<br>Jc<br><br><div class="gmail_quote">On Wed, Jul 13, 2011 at 2:05 PM, David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Take the double quotes off the set commands for your args variables.<br>
And put spaces in between the dereferences of those vars in the<br>
execute_process command.<br>
<br>
Like this:<br>
<br>
# No double quotes here:<br>
if(NOT $ENV{CMAKE_SVN_USERNAME} STREQUAL "")<br>
set(_SvnCredPart --no-auth-cache)<br>
set(_SvnUserPart --username $ENV{CMAKE_SVN_USERNAME})<br>
endif()<br>
if(NOT $ENV{CMAKE_SVN_PASSWORD} STREQUAL "")<br>
set(_SvnCredPart --no-auth-cache)<br>
set(_SvnPassPart --password $ENV{CMAKE_SVN_PASSWORD})<br>
endif()<br>
<br>
# Spaces in between dereferenced vars here:<br>
execute_process(COMMAND "${svnexe}" --non-interactive<br>
${_SvnCredPart} ${_SvnUserPart} ${_SvnPassPart}<br>
info .<br>
OUTPUT_VARIABLE _out<br>
ERROR_VARIABLE _err<br>
RESULT_VARIABLE _res)<br>
<br>
message(STATUS "out: ${_out}")<br>
message(STATUS "err: ${_err}")<br>
message(STATUS "res: ${_res}")<br>
<br>
<br>
HTH,<br>
David<br>
<div><div></div><div class="h5"><br>
<br>
On Wed, Jul 13, 2011 at 1:57 PM, <<a href="mailto:aaron.meadows@thomsonreuters.com">aaron.meadows@thomsonreuters.com</a>> wrote:<br>
> Hi all,<br>
><br>
><br>
><br>
> I’ve been having a devil of a time with executing SVN with execute_process.<br>
> Basically, I need to read environment variables to specify the username and<br>
> password for builds on our build server (where we do not cache credentials).<br>
><br>
><br>
><br>
> I’ve made several attempts at this, and have been foiled continually by one<br>
> problem, exemplified in the attached CMakeLists.txt. If I build arguments<br>
> in variables and then specify them in the execute_process, I get an error<br>
> like this:<br>
><br>
><br>
><br>
> -- err: svn.exe: invalid option: --no-auth-cache --username foo --password<br>
> bar<br>
><br>
> Type 'svn help' for usage.<br>
><br>
><br>
><br>
> However, if I write the identical command to a file and execute that, I get<br>
> no issue. I’ve narrowed it down to the <space> between --username and foo,<br>
> but can’t seem to figure out what the deal is. I’ve tried replacing them<br>
> with a value from string(ASCI 32 _sep), but that didn’t change the<br>
> behavior. I’ve tried this on Windows 7 and Windows Server 2008, and both<br>
> behave the same way.<br>
><br>
><br>
><br>
> You can try these two methods out on the CMakeLists.txt. By default, it<br>
> will use the straight execute_process. If you call cmake with –D TestFile=1<br>
> it will write the commands to a file and execute that. (in which case<br>
> you’ll get svn: '.' is not a working copy and not the invalid option issue)<br>
><br>
><br>
><br>
> Thanks for any help you can provide!<br>
><br>
><br>
><br>
> Aaron Meadows<br>
> Software Engineer<br>
><br>
> Thomson Reuters<br>
><br>
> Phone: <a href="tel:314.468.3530" value="+13144683530">314.468.3530</a><br>
> Mobile: <a href="tel:636.541.6139" value="+16365416139">636.541.6139</a><br>
> <a href="mailto:aaron.meadows@thomsonreuters.com">aaron.meadows@thomsonreuters.com</a><br>
> <a href="http://thomsonreuters.com" target="_blank">thomsonreuters.com</a><br>
><br>
><br>
><br>
> This email was sent to you by Thomson Reuters, the global news and<br>
> information company. Any views expressed in this message are those of the<br>
> individual sender, except where the sender specifically states them to be<br>
> the views of Thomson Reuters.<br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br><br>