View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011122CMakeCMakepublic2010-08-12 11:192016-06-10 14:31
ReporterKevin Fitch 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionFixed in Version 
Summary0011122: VS6 generator can't handle compiling the same file multiple times
DescriptionI have a weird case where the same file is compiled multiple times, with different preprocessor defines, and the different results are put into different libraries. With the nmake generator I get the correct results, using VS6 generator I get incorrect results. I am not 100% certain, but this may be a fundamental limitation of VS6. I have included an example where this happens. I am using the preprocessor define to create a function name so that it will be easier to see the problem. i.e. the problem occurs at link time instead of run time.

In my example, there is one file (ketchup.c) that should generate two different ketchup.obj files, but there is only one file, and it looks like VS6 just skips compiling it the second time.

I haven't tried with my toy example here, but newer VS generators seem to handle this OK.
TagsNo tags attached.
Attached Fileszip file icon badVS6.zip [^] (735 bytes) 2010-08-12 11:21

 Relationships

  Notes
(0024159)
David Cole (manager)
2010-12-15 11:20

Workaround suggestion: make a new *.c file with a new name, with contents:
#include "ketchup.c"

Then you'll have two uniquely named files, and VS6 support works for you without waiting for a CMake bug fix.

In fact, since there is what I would consider an easy work-around, I'd be inclined to simply resolve this one as "won't fix."
(0041737)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2010-08-12 11:19 Kevin Fitch New Issue
2010-08-12 11:21 Kevin Fitch File Added: badVS6.zip
2010-12-15 11:20 David Cole Note Added: 0024159
2010-12-15 11:20 David Cole Assigned To => David Cole
2010-12-15 11:20 David Cole Status new => assigned
2011-02-09 14:26 David Cole Status assigned => backlog
2011-02-09 15:06 David Cole Assigned To David Cole =>
2016-06-10 14:28 Kitware Robot Note Added: 0041737
2016-06-10 14:28 Kitware Robot Status backlog => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:28 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team