summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2008-12-09 21:07:10 (GMT)
committerDavid Cole <david.cole@kitware.com>2008-12-09 21:07:10 (GMT)
commit16f35e189e9af72be1422245391c4b3ba9cd826c (patch)
tree78e517fd01c86bbd08b2a658842b0f86192a3924 /Source/cmake.cxx
parent09084d89fb16a7ffc0d8ebf642cd478c51ad65ef (diff)
downloadCMake-16f35e189e9af72be1422245391c4b3ba9cd826c.zip
CMake-16f35e189e9af72be1422245391c4b3ba9cd826c.tar.gz
CMake-16f35e189e9af72be1422245391c4b3ba9cd826c.tar.bz2
COMP: Fix the ExternalProject test for Visual Studio 6. Visual Studio 6 *.dsp files cannot have hyphens in them. Add utility function GetVS6TargetName to replace hyphens with underscores when generating *.dsp file names. Use the function everywhere necessary in the VS6 generators. And, a workaround: VS6 uses ".\Debug" (for example) as an "$(IntDir)" value - strip any leading ".\" when processing a --config argument in the cmake --build handling code.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 7c8378a..b025185 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -4417,6 +4417,14 @@ int cmake::DoBuild(int ac, char* av[])
std::cerr << arg.GetHelp() << "\n";
return 1;
}
+
+ // Hack for vs6 that passes ".\Debug" as "$(IntDir)" value:
+ //
+ if (cmSystemTools::StringStartsWith(config.c_str(), ".\\"))
+ {
+ config = config.substr(2);
+ }
+
cmake cm;
return cm.Build(dir, target, config, extraBuildOptions, clean);
#endif