I am trying to run the post build command in CMake 3.1.1 with:
ADD_CUSTOM_COMMAND( TARGET mytarget POST_BUILD COMMAND for i in `ls *` \; do echo \$i \; done \;
However, the variable $ i evaluates to zero, although I avoid the dollar sign. According to the magazines, the team is evaluated as follows:
for i in `ls *` ; do echo ; done ;
I tried without slipping off the dollar sign, but this led to the same problem. The double slash didn't work either. Now I'm puzzled ...
Can you suggest a way to run a team that uses dollar signs?
PS It was just an example. My actual command is a bit more complicated, and I don't think I can handle it without using dollar signs.
source share