[cmake-developers] Module.GenerateExportHeader crash
Stephen Kelly
steveire at gmail.com
Tue Aug 14 07:04:30 EDT 2012
Bill Hoffman wrote:
> On 8/13/2012 10:54 AM, Stephen Kelly wrote:
>> Bill Hoffman wrote:
>>
>>> There is a new failure here:
>>> http://open.cdash.org/testDetails.php?test=156059931&build=2506673
>>>
>>
>> Is the output truncated somehow, or is that really all of it?
> I ran it in a debugger, and cmake was crashing, this fixed it, but I
> don't think it is the right fix, but should let you know what is going on:
>
>
> diff --git a/Source/cmNinjaTargetGenerator.cxx
> b/Source/cmNinjaTargetGenerator.c
> index 3532c8b..1e1c326 100644
> --- a/Source/cmNinjaTargetGenerator.cxx
> +++ b/Source/cmNinjaTargetGenerator.cxx
> @@ -398,7 +398,7 @@ cmNinjaTargetGenerator
>
> if(useClDeps)
> {
> - std::string cl = mf->GetDefinition("CMAKE_C_COMPILER");
> + std::string cl = mf->GetSafeDefinition("CMAKE_C_COMPILER");
> cl = "\"" + cl + "\" ";
> cmdLine = clDepsBinary + " " + lang + " $in \"$DEP_FILE\" $out "
> + clShowPrefix + " " + cl + cmdLine;
>
> mf->GetDefinition("CMAKE_C_COMPILER"); is returning null when cmake is
> running on the test binary tree.
>
> -Bill
I don't know enough about the Ninja generator to comment about anything
specific to it.
Why do you think that's not the correct fix?
Is there really no C compiler available?
Do you have a backtrace?
If you comment out the run_tests("C") in the GenerateExportHeader unit test,
does the problem go away?
Thanks,
Steve.
More information about the cmake-developers
mailing list