MantisBT - CMake
View Issue Details
0014265CMakeCMakepublic2013-07-03 08:242013-12-02 08:51
ycollet 
Brad King 
normalminoralways
closedfixed 
x86Windows7 64 bits
CMake 2.8.11 
CMake 2.8.12CMake 2.8.12 
0014265: ExternalProject documentation missing for chaining multiple commands in one step
In the CONFIGURE_COMMAND option, I added several commands in a row. Like:

CONFIGURE_COMMAND cmd1 && cmd2 && cmd3

But, due to a problem with visual studio, I needed to set CONFIGURE_LOG to 1.
But after setting CONFIGURE_LOG to 1, the CONFIGURE_COMMAND doesn't accept anymore composed command. I am now stuck to single command:

CONFIGURE_COMMAND cmd1
No tags attached.
related to 0014266closed Brad King cmake configure step in ExternalProject_Add makes Visual studio stops 
Issue History
2013-07-03 08:24ycolletNew Issue
2013-07-03 16:52Brad KingNote Added: 0033476
2013-07-03 16:54Brad KingRelationship addedrelated to 0014266
2013-07-05 02:40ycolletNote Added: 0033488
2013-07-08 11:46Brad KingNote Added: 0033509
2013-07-08 11:49Brad KingAssigned To => Brad King
2013-07-08 11:49Brad KingStatusnew => resolved
2013-07-08 11:49Brad KingResolutionopen => fixed
2013-07-08 11:49Brad KingFixed in Version => CMake 2.8.12
2013-07-08 11:49Brad KingTarget Version => CMake 2.8.12
2013-07-08 11:49Brad KingSummaryExternalProject_Add with CONFIGURE_LOG set to 1 doesn't accept composed command in CONFIGURE_COMMAND => ExternalProject documentation missing for chaining multiple commands in one step
2013-07-08 11:59Brad KingNote Edited: 0033509bug_revision_view_page.php?bugnote_id=33509#r1213
2013-12-02 08:51Robert MaynardNote Added: 0034638
2013-12-02 08:51Robert MaynardStatusresolved => closed

Notes
(0033476)
Brad King   
2013-07-03 16:52   
You'll have to work around this by wrapping up your commands in a .cmd script or something. The logging mechanism works by wrapping the commands up in cmake scripts with execute_process calls, and those don't support shell operators. I wouldn't claim shell operators like && are officially supported in the *_COMMAND options in the first place. We can update the documentation to say so.
(0033488)
ycollet   
2013-07-05 02:40   
Thanks for this information.

It should be nice to be able to add composed commands in *_COMMAND.

Do I fill a request for this ?

YC
(0033509)
Brad King   
2013-07-08 11:46   
(edited on: 2013-07-08 11:59)
Actually we do have a way to compose commands but forgot to document it:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93c11657 [^]

(0034638)
Robert Maynard   
2013-12-02 08:51   
Closing resolved issues that have not been updated in more than 4 months.