[CMake] Issues with execute_process and svn

aaron.meadows at thomsonreuters.com aaron.meadows at thomsonreuters.com
Wed Jul 13 13:57:12 EDT 2011


Hi all,

 

I've been having a devil of a time with executing SVN with
execute_process.  Basically, I need to read environment variables to
specify the username and password for builds on our build server (where
we do not cache credentials).

 

I've made several attempts at this, and have been foiled continually by
one problem, exemplified in the attached CMakeLists.txt.  If I build
arguments in variables and then specify them in the execute_process, I
get an error like this:

 

-- err: svn.exe: invalid option: --no-auth-cache --username foo
--password bar

Type 'svn help' for usage.

 

However, if I write the identical command to a file and execute that, I
get no issue.  I've narrowed it down to the <space> between --username
and foo, but can't seem to figure out what the deal is.  I've tried
replacing them with a value from string(ASCI 32 _sep), but that didn't
change the behavior.  I've tried this on Windows 7 and Windows Server
2008, and both behave the same way.

 

You can try these two methods out on the CMakeLists.txt.  By default, it
will use the straight execute_process.  If you call cmake with -D
TestFile=1 it will write the commands to a file and execute that.  (in
which case you'll get svn: '.' is not a working copy and not the invalid
option issue)

            

Thanks for any help you can provide!

 

Aaron Meadows
Software Engineer

Thomson Reuters

Phone: 314.468.3530
Mobile: 636.541.6139
aaron.meadows at thomsonreuters.com
<mailto:aaron.meadows at thomsonreuters.com> 
thomsonreuters.com

 


This email was sent to you by Thomson Reuters, the global news and information company. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110713/5cf01b15/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110713/5cf01b15/attachment.txt>


More information about the CMake mailing list