[CMake] Segfault with cmake 2.8.0 rc4 and CGAL-3.5

Brad King brad.king at kitware.com
Mon Nov 2 11:34:56 EST 2009


Orion Poplawski wrote:
> Trying to configure CGAL 3.5 with cmake 2.8.0 rc4 on Fedora and cmake is
> segfaulting.  Quick analysis shows that it's faulting here:
> 
> #1  cmMakefile::RaiseScope (this=<value optimized out>)
>     at /usr/src/debug/cmake-2.8.0-rc4/Source/cmMakefile.cxx:3392
> 3392              this->LocalGenerator->GetParent()->GetMakefile())
> (gdb) list
> 3391      else if(cmMakefile* parent =
> 3392              this->LocalGenerator->GetParent()->GetMakefile())
> 3393        {
> 
> looks like this->LocalGenerator->Parent is null here.
> 
> (gdb) print this->LocalGenerator->Parent
> $3 = (cmLocalGenerator *) 0x0
> 
> Does there need to be check for it being null, or should it never be null?

The check for null is incorrectly applied to the GetMakefile() call instead
of the GetParent() call.  We'll fix it for the next release candidate.

However, it does mean that the project tries to use set(... PARENT_SCOPE)
at the top level, which should also be fixed.

-Brad


More information about the CMake mailing list