summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-09-10 20:49:40 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-09-10 20:49:40 (GMT)
commit38e412626b604d7f79cac82153047fc59b55597f (patch)
treec4b06f6f515e5486f287408575d9336c52645668 /Source/cmGlobalVisualStudio6Generator.cxx
parent820088cefc2831a887c141dc4daf6dd758c4c365 (diff)
downloadCMake-38e412626b604d7f79cac82153047fc59b55597f.zip
CMake-38e412626b604d7f79cac82153047fc59b55597f.tar.gz
CMake-38e412626b604d7f79cac82153047fc59b55597f.tar.bz2
modified TryCompile
Diffstat (limited to 'Source/cmGlobalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx19
1 files changed, 15 insertions, 4 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index 4c91f55..79dbba7 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -46,7 +46,8 @@ void cmGlobalVisualStudio6Generator::EnableLanguage(const char*,
int cmGlobalVisualStudio6Generator::TryCompile(const char *,
const char *bindir,
- const char *projectName)
+ const char *projectName,
+ const char *targetName)
{
// now build the test
std::string makeCommand =
@@ -80,9 +81,19 @@ int cmGlobalVisualStudio6Generator::TryCompile(const char *,
#endif
makeCommand += " ";
makeCommand += projectName;
- makeCommand += ".dsw /MAKE \"ALL_BUILD - Debug\" /REBUILD";
+ makeCommand += ".dsw /MAKE \"";
+ if (targetName)
+ {
+ makeCommand += targetName;
+ }
+ else
+ {
+ makeCommand += "ALL_BUILD";
+ }
+ makeCommand += " - Debug\" /REBUILD";
- if (!cmSystemTools::RunCommand(makeCommand.c_str(), output))
+ int retVal;
+ if (!cmSystemTools::RunCommand(makeCommand.c_str(), output, retVal))
{
cmSystemTools::Error("Generator: execution of msdev failed.");
// return to the original directory
@@ -90,7 +101,7 @@ int cmGlobalVisualStudio6Generator::TryCompile(const char *,
return 1;
}
cmSystemTools::ChangeDirectory(cwd.c_str());
- return 0;
+ return retVal;
}
///! Create a local generator appropriate to this Global Generator