View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008216CMakeCMakepublic2008-12-03 03:412008-12-04 09:26
ReporterRobert Lenhardt 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0008216: visual studio 6 -- defines are not passed to rc compiler
DescriptionFor Visual Studio 6, the COMPILE_DEFINITIONS* properties are not passed to the resource compiler. I have attached a fix which involves adding new placeholders COMPILE_DEFINITIONS* for the *.dsptemplate's and the corresponding ReplaceString calls in cmLocalVisualStudio6Generator.cxx which replace these with the defines added.
TagsNo tags attached.
Attached Filespatch file icon cmLocalVisualStudio6Generator.cxx.patch [^] (4,255 bytes) 2008-12-03 03:41 [Show Content]
patch file icon DSPTemplates.patch [^] (6,237 bytes) 2008-12-03 03:41 [Show Content]

 Relationships

  Notes
(0014279)
Bill Hoffman (manager)
2008-12-03 15:36

Committer: Bill Hoffman <bill.hoffman@kitware.com>
Committer: Bill Hoffman <bill.hoffman@kitware.com>
/cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v <-- Source/cmLocalVisualStudio6Generator.cxx
new revision: 1.145; previous revision: 1.144
/cvsroot/CMake/CMake/Templates/DLLHeader.dsptemplate,v <-- Templates/DLLHeader.dsptemplate
new revision: 1.30; previous revision: 1.29
/cvsroot/CMake/CMake/Templates/EXEHeader.dsptemplate,v <-- Templates/EXEHeader.dsptemplate
new revision: 1.25; previous revision: 1.24
/cvsroot/CMake/CMake/Templates/EXEWinHeader.dsptemplate,v <-- Templates/EXEWinHeader.dsptemplate
new revision: 1.24; previous revision: 1.23
/cvsroot/CMake/CMake/Templates/staticLibHeader.dsptemplate,v <-- Templates/staticLibHeader.dsptemplate
new revision: 1.22; previous revision: 1.21
(0014285)
Robert Lenhardt (reporter)
2008-12-04 04:45
edited on: 2008-12-04 04:47

Sorry, there was a mistake in my patch. The defines should be simply appended as strings to the flags, not with the AppendDefines function. This function takes a list as second argument, but the defines are in a space separated string form already. So they are altogether quoted and appended, causing the last define of the list -- say it is named DEF -- to become DEF" in VisualStudio. Below is a patch:


Index: Source/cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.145
diff -u -r1.145 cmLocalVisualStudio6Generator.cxx
--- Source/cmLocalVisualStudio6Generator.cxx 3 Dec 2008 20:35:35 -0000 1.145
+++ Source/cmLocalVisualStudio6Generator.cxx 4 Dec 2008 09:34:39 -0000
@@ -1529,11 +1529,10 @@
     this->AppendDefines(minsizeDefines,target.GetProperty("COMPILE_DEFINITIONS_MINSIZEREL"), 0);
     this->AppendDefines(debugrelDefines,target.GetProperty("COMPILE_DEFINITIONS_RELWITHDEBINFO"), 0);
 
- this->AppendDefines(flags, defines.c_str(), 0);
- this->AppendDefines(flagsDebug, debugDefines.c_str(), 0);
- this->AppendDefines(flagsRelease, releaseDefines.c_str(), 0);
- this->AppendDefines(flagsMinSize, minsizeDefines.c_str(), 0);
- this->AppendDefines(flagsDebugRel, debugrelDefines.c_str(), 0);
+ flags += defines;
+ flagsDebug += debugDefines;
+ flagsRelease += releaseDefines;
+ flagsMinSize += minsizeDefines;
+ flagsDebugRel += debugrelDefines;
 
     // The template files have CXX FLAGS in them, that need to be replaced.
     // There are not separate CXX and C template files, so we use the same

(0014287)
Bill Hoffman (manager)
2008-12-04 09:07

I see that on the dashboard today... I really should have tested it... 10 tests failed last night because of this. I have checked in the fix, and am running the tests, and things seem to be working better now.
(0014288)
Bill Hoffman (manager)
2008-12-04 09:26

OK, it now passes all the tests again...

 Issue History
Date Modified Username Field Change
2008-12-03 03:41 Robert Lenhardt New Issue
2008-12-03 03:41 Robert Lenhardt File Added: cmLocalVisualStudio6Generator.cxx.patch
2008-12-03 03:41 Robert Lenhardt File Added: DSPTemplates.patch
2008-12-03 15:36 Bill Hoffman Note Added: 0014279
2008-12-03 15:36 Bill Hoffman Status new => closed
2008-12-03 15:36 Bill Hoffman Resolution open => fixed
2008-12-04 04:45 Robert Lenhardt Note Added: 0014285
2008-12-04 04:45 Robert Lenhardt Status closed => feedback
2008-12-04 04:45 Robert Lenhardt Resolution fixed => reopened
2008-12-04 04:47 Robert Lenhardt Note Edited: 0014285
2008-12-04 09:07 Bill Hoffman Note Added: 0014287
2008-12-04 09:26 Bill Hoffman Note Added: 0014288
2008-12-04 09:26 Bill Hoffman Status feedback => closed
2008-12-04 09:26 Bill Hoffman Resolution reopened => fixed


Copyright © 2000 - 2018 MantisBT Team