[cmake-developers] Ninja with multiple commands (was: CMAKE_ARGC and CMAKE_ARGVx)

Brad King brad.king at kitware.com
Tue May 3 08:41:54 EDT 2011


On 04/28/2011 02:24 PM, Nicolas Desprès wrote:
> Ninja accepts only one command per rule contrary to make.
> So when several commands must be called (for example: ar and ranlib),
> one possibility is to bundle the commands in a cmake scripts

Instead of trying to pass this all through CMake language syntax and
the execute_process command, I suggest you create a dedicated internal
interface for it.  See for example the cmake::ExecuteLinkScript method
and the calls to it already used to execute long linker command lines.

-Brad



More information about the cmake-developers mailing list