summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio6Generator.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/cmGlobalVisualStudio6Generator.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/cmGlobalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index 612e50f..51f38c2 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -33,6 +33,7 @@ std::string GetVS6TargetName(const std::string& targetName)
cmGlobalVisualStudio6Generator::cmGlobalVisualStudio6Generator()
{
this->FindMakeProgramFile = "CMakeVS6FindMake.cmake";
+ this->MSDevCommandInitialized = false;
}
void cmGlobalVisualStudio6Generator
@@ -77,6 +78,33 @@ void cmGlobalVisualStudio6Generator::GenerateConfigurations(cmMakefile* mf)
}
}
+//----------------------------------------------------------------------------
+std::string const& cmGlobalVisualStudio6Generator::GetMSDevCommand()
+{
+ if(!this->MSDevCommandInitialized)
+ {
+ this->MSDevCommandInitialized = true;
+ this->MSDevCommand = this->FindMSDevCommand();
+ }
+ return this->MSDevCommand;
+}
+
+//----------------------------------------------------------------------------
+std::string cmGlobalVisualStudio6Generator::FindMSDevCommand()
+{
+ std::string vscmd;
+ std::string vskey = this->GetRegistryBase() + "\\Setup;VsCommonDir";
+ if(cmSystemTools::ReadRegistryValue(vskey.c_str(), vscmd,
+ cmSystemTools::KeyWOW64_32))
+ {
+ cmSystemTools::ConvertToUnixSlashes(vscmd);
+ vscmd += "/MSDev98/Bin/";
+ }
+ vscmd += "msdev.exe";
+ return vscmd;
+}
+
+//----------------------------------------------------------------------------
void
cmGlobalVisualStudio6Generator::GenerateBuildCommand(
std::vector<std::string>& makeCommand,