[cmake-developers] [PATCH] Pass CMAKE_VERBOSE_MAKEFILE value to Ninja Generator

Brad King brad.king at kitware.com
Wed Feb 25 16:45:35 EST 2015


On 02/25/2015 04:24 PM, Gregor Jasny wrote:
> Ninja build system does not support a in-Makefile verbositiy
> switch. So we use cmake --build as a fall back to extract the
> CMAKE_VERBOSE_MAKEFILE property and pass it as an optional
> -v argument to Ninja.

Thanks for working on this.

> +  if(it.Find("CMAKE_VERBOSE_MAKEFILE"))
> +    {
> +    bool verboseBuild = it.GetValueAsBool();
> +    gen->SetVerboseBuild(verboseBuild);
> +    }
>    return gen->Build("", dir,
>                      projName, target,
>                      output,

Instead of having a generator-wide state (member variable) that
affects only one method, please extend the Build() and
GenerateBuildCommand() signatures to thread the value through.

Thanks,
-Brad



More information about the cmake-developers mailing list