View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000806CMakepublic2004-04-28 18:012004-04-29 10:27
ReporterGordon Schumacher 
Assigned ToSystem Admin 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000806: Changing CMAKE_GENERATOR by -Cfile crashes cmake
DescriptionI have only the following files in a directory (i.e., otherwise a clean tree):

--- test.cmake ---
IF(TARGET MATCHES dos32)
   SET(CMAKE_GENERATOR CACHE INTERNAL "Unix Makefiles" FORCE)
ENDIF(TARGET MATCHES dos32)
--- test.cmake ---

--- CMakeLists.txt ---
CMAKE_MINIMUM_REQUIRED(VERSION 1.8)
--- CMakeLists.txt ---

If I issue the following command:
D:\Progra~1\cmake-devel\bin\cmake -DTARGET:STRING=dos32 -Ctest.cmake

This appears to be because genName, as set from the call to m_CacheManager->GetCacheValue on line 1011 of cmake.cxx, is an empty-string - which means that the call to CreateGlobalGenerator will fail, leaving m_GlobalGenerator NULL.

I am not at all sure why CMAKE_GENERATOR is being set to empty-string, though this appears to be true any time I set CMAKE_GENERATOR, under any conditions, on any version of cmake.

I have pulled the CVS nightly stamp as of two hours ago.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0000999)
Bill Hoffman (manager)
2004-04-29 10:27

I have fixed the crash, but the problem actually was in you test.cmake file and a mis-use of the SET command. You actually set the generator to the empty string. The correct syntax is this:

  SET(CMAKE_GENERATOR "Unix Makefiles" CACHE INTERNAL "" FORCE )
If you make that change, it should work even without the crash fix.

 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team