View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001049CMakepublic2004-08-12 08:402005-01-13 13:37
ReporterMarco Nolden 
Assigned ToBill Hoffman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001049: cmake parser(?) error which did not appear in 1.8
DescriptionWhen using cmake 2.0.3 it fails with an error message about an unclosed IF-statement which didn't happen with the latest 1.8 release. I will attach the main CMakeLists.txt file. The complete package is available from anonymous cvs. For details look at www.mitk.org/download/download.html
TagsNo tags attached.
Attached Filestxt file icon CMakeLists.txt [^] (1,149 bytes) 1969-12-31 19:00 [Show Content]

 Relationships

  Notes
(0001366)
Bill Hoffman (manager)
2004-08-12 17:18

The problem is a missing quote:
 OPTION(BUILD_QT_EXAMPLE "Build the QT example application ON)

CMake should report that as an error instead of a missing ENDIF
(0001367)
Brad King (manager)
2004-08-12 17:28

There is no way for CMake to detect this as an error in version 2.0 because multi-line arguments in double quotes are supported. For all CMake 2.0 knows, the text in the double-quoted argument is supposed to be in the string. Instead it should probably detect that the file ends inside a string argument, but I'm not sure how to do that because the lex-based parser just doesn't return the string argument token since it never finds the end quote. Ideas anyone?
(0001402)
Brad King (manager)
2004-08-31 18:40

I have modified the parser to detect EOF inside a string and complain with an error message about an unterminated string.

I've committed the changes to the CVS version:

Checking in cmListFileCache.cxx;
/cvsroot/CMake/CMake/Source/cmListFileCache.cxx,v <-- cmListFileCache.cxx
new revision: 1.21; previous revision: 1.20
done
Checking in cmListFileLexer.c;
/cvsroot/CMake/CMake/Source/cmListFileLexer.c,v <-- cmListFileLexer.c
new revision: 1.7; previous revision: 1.6
done
Checking in cmListFileLexer.h;
/cvsroot/CMake/CMake/Source/cmListFileLexer.h,v <-- cmListFileLexer.h
new revision: 1.3; previous revision: 1.2
done
Checking in cmListFileLexer.in.l;
/cvsroot/CMake/CMake/Source/cmListFileLexer.in.l,v <-- cmListFileLexer.in.l
new revision: 1.7; previous revision: 1.6
done

These changes should be merged to the 2.0 release branch.
(0001403)
Brad King (manager)
2004-08-31 18:52

I've made one more change to improve the error message in another case of early file termination:

Checking in cmListFileCache.cxx;
/cvsroot/CMake/CMake/Source/cmListFileCache.cxx,v <-- cmListFileCache.cxx
new revision: 1.22; previous revision: 1.21
done

This should also be merged to the 2.0 branch.

 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team