diff options
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 57be2fa..01ab1ba 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -47,7 +47,8 @@ void cmGlobalVisualStudio7Generator::EnableLanguage(const char*, int cmGlobalVisualStudio7Generator::TryCompile(const char *, const char *bindir, - const char *projectName) + const char *projectName, + const char *targetName) { // now build the test std::string makeCommand = @@ -81,9 +82,18 @@ int cmGlobalVisualStudio7Generator::TryCompile(const char *, #endif makeCommand += " "; makeCommand += projectName; - makeCommand += ".sln /rebuild Debug /project ALL_BUILD"; + makeCommand += ".sln /rebuild Debug /project "; + if (targetName) + { + makeCommand += targetName; + } + else + { + makeCommand += "ALL_BUILD"; + } - if (!cmSystemTools::RunCommand(makeCommand.c_str(), output)) + int retVal; + if (!cmSystemTools::RunCommand(makeCommand.c_str(), output, retVal)) { cmSystemTools::Error("Generator: execution of devenv failed."); // return to the original directory @@ -91,7 +101,7 @@ int cmGlobalVisualStudio7Generator::TryCompile(const char *, return 1; } cmSystemTools::ChangeDirectory(cwd.c_str()); - return 0; + return retVal; } ///! Create a local generator appropriate to this Global Generator |