MantisBT - CMake
View Issue Details
0011649CMakeCMakepublic2010-12-31 14:302011-01-12 08:12
litghost 
Brad King 
highblockalways
closedfixed 
WindowsWindowsWindows 7
CMake 2.8.3 
CMake 2.8.4CMake 2.8.4 
0011649: Visual Studio 9 Generator incorrectly allows only one instance of /FI flag
The Visual Studio 9 Generator does not allow more than one instance of the /FI flag because it's definition in cmLocalVisualStudio7GeneratorFlagTable is incorrect.

It should have the cmVS7FlagTable::SemicolonAppendable added to it.

I have attached a test case, and a patch.
Use the VS 9 generator on the provided test case (see test.7z attachment). It should compile correctly if the "ForcedIncludeFiles" option is "inc1.h;inc2.h". It can be seen in the IDE as "Configuration Properties->C/C++->Advanced->Force Includes".

Error build will look like:
1>------ Build started: Project: test, Configuration: Debug Win32 ------
1>Compiling...
1>test.cpp
1>n:\darkengine\test\inc2.h(1) : error C2059: syntax error : 'return'
1>n:\darkengine\test\inc2.h(2) : error C2059: syntax error : '}'
1>n:\darkengine\test\inc2.h(2) : error C2143: syntax error : missing ';' before '}'
1>n:\darkengine\test\inc2.h(2) : error C2059: syntax error : '}'
1>Build log was saved at "file://n:\DarkEngine\test\build\test.dir\Debug\BuildLog.htm" [^]
1>test - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

Successful build looks like:
1>------ Build started: Project: test, Configuration: Debug Win32 ------
1>Compiling...
1>test.cpp
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1>Embedding manifest...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Build log was saved at "file://n:\DarkEngine\test\build\test.dir\Debug\BuildLog.htm" [^]
1>test - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
No tags attached.
has duplicate 0011917closed Brad King Visual Studio 9 generator cannot cope with more than one force include (-FI option) 
7z test.7z (338) 2010-12-31 14:30
https://public.kitware.com/Bug/file/3595/test.7z
patch flag.patch (643) 2010-12-31 14:31
https://public.kitware.com/Bug/file/3596/flag.patch
Issue History
2010-12-31 14:30litghostNew Issue
2010-12-31 14:30litghostFile Added: test.7z
2010-12-31 14:31litghostFile Added: flag.patch
2011-01-03 10:05Brad KingAssigned To => Brad King
2011-01-03 10:05Brad KingStatusnew => assigned
2011-01-03 10:06Brad KingNote Added: 0024356
2011-01-03 10:06Brad KingStatusassigned => closed
2011-01-03 10:06Brad KingResolutionopen => fixed
2011-01-12 08:12David ColeFixed in Version => CMake 2.8.4
2011-01-12 08:12David ColeTarget Version => CMake 2.8.4
2011-03-02 13:24Brad KingRelationship addedhas duplicate 0011917

Notes
(0024356)
Brad King   
2011-01-03 10:06   
Fixed, thanks:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b29eadd8 [^]