Title: [Nant-users] Cl.exe /I for additional include directories

Thank you Melissa

 

the “,” delimiter is still in CVS (http://cvs.sourceforge.net/viewcvs.py/nant/nant/src/NAnt.VSNet/VcProject.cs?rev=1.16&view=auto)

 

to nant commiters : could anyone fix this in the nightly build ? it seems that replacing Split(‘,’) by Split(new Char [] {',', ';'}) could do the job

 

old code :

string includeDirs = fileConfig.GetToolSetting(compilerTool, "AdditionalIncludeDirectories");
            if (!StringUtils.IsNullOrEmpty(includeDirs)) {
                foreach (string includeDir in includeDirs.Split(',')) {
                    clTask.IncludeDirs.DirectoryNames.Add(includeDir);
                }
            }

 

new code :

string includeDirs = fileConfig.GetToolSetting(compilerTool, "AdditionalIncludeDirectories");
            if (!StringUtils.IsNullOrEmpty(includeDirs)) {
                foreach (string includeDir in includeDirs.Split(new Char[] { ‘,’,’;’})) {
                    clTask.IncludeDirs.DirectoryNames.Add(includeDir);
                }
            }

 

looking at the ClTask code, this would solve this issue

 

regards

 

Thibaut

 

 

-----Original Message-----
From: Melissa Kacher (Temporary) [mailto:[EMAIL PROTECTED]]
Sent
: mardi 15 juin 2004 20:09
To: [EMAIL PROTECTED]
Subject: [Nant-users] Cl.exe /I for additional include directories

 

If you use nant 0.84 look at:
src\nant.vsnet\vcproject.cs line 269

In all of my project files, the separator is always ";", never ",". I changed "," to ";" and all is well with this. Since you are using the latest, I guess this bug is still in nant. Line numbers are likely different, so here is the code with the bug:

            string includeDirs = fileConfig.GetToolSetting(compilerTool, "AdditionalIncludeDirectories");
            if (!StringUtils.IsNullOrEmpty(includeDirs)) {
                foreach (string includeDir in includeDirs.Split(',')) {
                    clTask.IncludeDirs.DirectoryNames.Add(includeDir);
                }
            }

Good luck,
Melissa


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.705 / Virus Database: 461 - Release Date: 12/06/2004

Reply via email to