[CMake] add_custom_command and visual c++ only running first command?
Dan Kegel
dank at kegel.com
Fri Jun 5 14:32:26 EDT 2015
I was using add_custom_command to execute three commands, triggering
that rule with add_custom_target, and it worked great with make and
ninja on linux and mac.
Over on Windows, though, with visual c++ 2013 and cmake 3.0.1, only
the first of the three commands was executed.
After much head-scratching, I junked the add_custom_targets, and just
used add_custom_target, since the commands were supposed to be
unconditional anyway. (Why'd I use add_custom_command in the first
place?)
That seemed to work better.
(I also moved the three commands out into a script, which may also have helped.)
Has anyone else had problems with add_custom_command being squirrely
with visual c++?
More information about the CMake
mailing list