summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-13 19:27:51 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-18 13:26:24 (GMT)
commit5f5c92b9a2c2f9c780c08e23231b93af71f175bd (patch)
treed9c078f01baba2b21b8aacff0679921d6cf533b0 /Source/cmGlobalVisualStudio7Generator.cxx
parent4ac75fdfe6e7a91f3beea037d13b1f4c8c8b80ed (diff)
downloadCMake-5f5c92b9a2c2f9c780c08e23231b93af71f175bd.zip
CMake-5f5c92b9a2c2f9c780c08e23231b93af71f175bd.tar.gz
CMake-5f5c92b9a2c2f9c780c08e23231b93af71f175bd.tar.bz2
VS: Add internal APIs to find MSBuild, devenv/VCExpress, and msdev
Teach the VS generators to compute the locations of these tools directly from registry entries. Add internal APIs to get the locations on demand.
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 04563f3..2602f83 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -22,6 +22,7 @@ cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator(
{
this->FindMakeProgramFile = "CMakeVS7FindMake.cmake";
this->IntelProjectVersion = 0;
+ this->DevEnvCommandInitialized = false;
if (!platformName)
{
@@ -110,6 +111,33 @@ void cmGlobalVisualStudio7Generator
}
+//----------------------------------------------------------------------------
+std::string const& cmGlobalVisualStudio7Generator::GetDevEnvCommand()
+{
+ if(!this->DevEnvCommandInitialized)
+ {
+ this->DevEnvCommandInitialized = true;
+ this->DevEnvCommand = this->FindDevEnvCommand();
+ }
+ return this->DevEnvCommand;
+}
+
+//----------------------------------------------------------------------------
+std::string cmGlobalVisualStudio7Generator::FindDevEnvCommand()
+{
+ std::string vscmd;
+ std::string vskey = this->GetRegistryBase() + ";InstallDir";
+ if(cmSystemTools::ReadRegistryValue(vskey.c_str(), vscmd,
+ cmSystemTools::KeyWOW64_32))
+ {
+ cmSystemTools::ConvertToUnixSlashes(vscmd);
+ vscmd += "/";
+ }
+ vscmd += "devenv.com";
+ return vscmd;
+}
+
+//----------------------------------------------------------------------------
void cmGlobalVisualStudio7Generator::GenerateBuildCommand(
std::vector<std::string>& makeCommand,
const char* makeProgram,