Why does the ninja generator need to use&&?  I am pretty sure the other
CMake generators do not need to use&&.


Most of them come from the working directory: cd foo&&  g++
They could be worked around easly by adding a new variable to the rules.

Seems like there should be a better way to run a command in a directory. Does ninja have a working directory at all? I guess you are saying there is a way to do this with a variable in the rules... Not sure what that means, but if it works... :)
Others comes from the support of PRE_BUILD, POST_BUILD, and custom
target / commands with more than one command. In ninja, contrary to
make, when specifying a build statement (e.g. foo.o: foo.c foo.h) you
can "attach" only one rule (e.g. one command) and not several like in
make.

Right, so, if there is more than one command, you can turn it into one command by creating a small cmake script that runs consecutive execute_process calls.

They have been several discussion thread for adding basic "shell"
features like in Ninja:
- redirection
- environment variable
- working directory
- chainning

There is no patch proposal yet AFAIK.
Sure, so until then, I think the above should be fine to get this working on windows. No one should be depending on redirection or chaining in cmake projects.

-Bill
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to