diff options
Diffstat (limited to 'Source/cmGlobalVisualStudio6Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio6Generator.cxx | 19 |
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 |