[Cmake] INCLUDE_EXTERNAL_MSPROJECT caused crash

William A. Hoffman billlist at nycap.rr.com
Wed, 07 Jan 2004 09:25:33 -0500


We have found the problem, and the fix should be in cmake 1.8.3 which should
be out soon.

-Bill


At 01:41 PM 1/6/2004, Karr, David wrote:
>I am trying to upgrade from CMake 1.6.7 to 1.8.1, but my CMakeLists.txt no
>longer
>works. I created a minimal test case that shows the problem:
> 
># CMakeLists.txt
>PROJECT(test)
>INCLUDE_EXTERNAL_MSPROJECT(other_project other_project.dsp)
>ADD_EXECUTABLE(test SomeSource.cpp)
> 
>where other_project.dsp and SomeSource.cpp were files that already 
>existed in the same directory as CMakeLists.txt.
> 
>This works fine in CMake 1.6.7. It creates test.dsw which includes
>other_project.
>But CMake 1.8.1 crashes every time without warning. When I remove the
>command
>INCLUDE_EXTERNAL_MSPROJECT, CMake 1.8.1 runs OK, but of
>course then there are no external projects shown in my workspace.
> 
>Running this from the debugger, the error occurs while executing line 317 of
>cmGlobalVisualStudio6Generator.cxx: 
> 
>        cmCustomCommand cc = l->second.GetPreLinkCommands()[0];
>
> 
>The problem seems to be that when this is executed, and I examine l->second,
>which is supposed to be a cmTarget, all the vector<> members of l->second
>are empty.
>Hence what we get from l->second.GetPreLinkCommands()[0] is the "end"
>marker,
>and attempts to read strings from this object have bad results.
> 
>How is this supposed to work in 1.8.1, and why does it work differently than
>in
>version 1.6.7?
> 
>--David
> 
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake