View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001849CMakeCMakepublic2005-05-13 11:322006-10-04 20:14
ReporterReinhold Fuereder 
Assigned ToBrad King 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001849: MSVC6 .dsp file line length limit exceeded (include directories)
DescriptionCMake 2.05, MSVC 6.0, Windows 2000.

Due to efforts of making the usage of our CMake managed projects as easy as possible we currently "resolve" all include directory dependencies in each subproject directly. This now led to the issue of a too long include directory line in the generated .dsp MSVC6 project file. After 4096 characters a simple line break is inserted:

# ADD CPP /I "D:\CVS\wxWindows\include" ... /I "D:\CVS\bla [\n] bla bla /I "D:\CVS\bla" -DUSE_BLA -DWNT /D "ScanCAD_EXPORTS"
# ADD CPP /W3 /Zm1000 /GX /GR -DNOMINMAX /D "_MBCS"

Consequently MSVC does not seem to be able to parse this correctly and omits '/I "D:\CVS\bla" -DUSE_BLA -DWNT /D "ScanCAD_EXPORTS"' in this case.


The reason for our huge include directory list is our kinda lazy, but user-friendly way of organising subprojects with direct INCLUDE_DIRECTORIES (...) calls (B depends on A, C depends on A, D depends on A and B and C):
A: INCLUDE_DIRECTORIES (a1 a2)
B: INCLUDE_DIRECTORIES (a1 a2 b1)
C: INCLUDE_DIRECTORIES (a1 a2 c1)
D: INCLUDE_DIRECTORIES (a1 a2 a1 a2 b1 a1 a2 c1)
Thus, there are a lot of dupliate entries.

Now as the line limit is exceeded we are wondering, if it would not be an extremely easy option to just add a more MSVC friendly line break by starting the next line with another '# ADD CPP /I "..." ...'? (In analogy to LINK32 entries in the .dsp file, if it is accepted by MSVC6.)

Certainly, we could circumvent this duplicate entries by a less convenient approach: Replacing direct calls of INCLUDE_DIRECTORIES (...) by variable usage, but still resolve all dependencies directly, i.e. leading to duplicates. In the end we then need to use the unifying container adding macros (posted by Iker Arizmendi on 12 June 2004) for the purpose of turning the list of include dirs (including duplicates) into the final and single INCLUDE_DIRECTORIES (...) call.

Would you mind turning the current line breaks as aforementioned? Or, another option by filtering the duplicate include directory entries before writing them out in CMake?
TagsNo tags attached.
Attached Files? file icon ScanCAD.dsp [^] (127,249 bytes) 1969-12-31 19:00
? file icon Copy of ScanCAD.dsp [^] (126,901 bytes) 1969-12-31 19:00

 Relationships

  Notes
(0002417)
Brad King (manager)
2005-05-13 13:25

We could also remove duplicate entries from the include path before writing the list to the .dsp file.
(0005219)
Bill Hoffman (manager)
2006-10-04 20:03

Do we remove duplicates now Brad?
(0005222)
Brad King (manager)
2006-10-04 20:14

Duplicates are removed, and short paths are used if necessary:

revision 1.90
date: 2006-02-18 11:51:23 -0500; author: king; state: Exp; lines: +36 -15
ENH: [snip] The VS6 generator will now short-path the include directories if the total length is too long in order to try to avoid its truncation limit.

 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team