[CMake] CMake: how to use 'for cyclic sentence' in command add_custom_command(...)

Chaos Zhang zcsd2012 at gmail.com
Tue Apr 19 09:20:51 EDT 2016


Hi,

I was using 'for cyclic sentence' in command add_custom_command(...), the
content of the CMakeLists.txt as below:
add_custom_command(TARGET temp_target
				POST_BUILD
				COMMAND for x in a b c\; 
                                do echo $x \;
                                done\;)

The result of execution was not like as below:
a
b
c
But like this:



Just print 3 blank lines. So how to use it correctly?

Thanks for your help,
Chao Zhang



--
View this message in context: http://cmake.3232098.n2.nabble.com/CMake-how-to-use-for-cyclic-sentence-in-command-add-custom-command-tp7593286.html
Sent from the CMake mailing list archive at Nabble.com.


More information about the CMake mailing list