diff options
author | Ken Martin <ken.martin@kitware.com> | 2002-09-10 20:49:40 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2002-09-10 20:49:40 (GMT) |
commit | 38e412626b604d7f79cac82153047fc59b55597f (patch) | |
tree | c4b06f6f515e5486f287408575d9336c52645668 /Source/cmGlobalVisualStudio7Generator.cxx | |
parent | 820088cefc2831a887c141dc4daf6dd758c4c365 (diff) | |
download | CMake-38e412626b604d7f79cac82153047fc59b55597f.zip CMake-38e412626b604d7f79cac82153047fc59b55597f.tar.gz CMake-38e412626b604d7f79cac82153047fc59b55597f.tar.bz2 |
modified TryCompile
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 |