diff options
author | Brad King <brad.king@kitware.com> | 2003-05-14 14:34:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-05-14 14:34:59 (GMT) |
commit | 9b73353baa4cc36ad72fbcf620d02548d8e127a5 (patch) | |
tree | 7a00ecb318122673944cd1340234c6317c6550f6 /Source/MFCDialog | |
parent | 5e548d41d3a6f77b420f26103a1a82f6be27793c (diff) | |
download | CMake-9b73353baa4cc36ad72fbcf620d02548d8e127a5.zip CMake-9b73353baa4cc36ad72fbcf620d02548d8e127a5.tar.gz CMake-9b73353baa4cc36ad72fbcf620d02548d8e127a5.tar.bz2 |
ENH: Default generator selection for VS 7.1 added.
Diffstat (limited to 'Source/MFCDialog')
-rw-r--r-- | Source/MFCDialog/CMakeSetupDialog.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp index 04dc86d..c744a57 100644 --- a/Source/MFCDialog/CMakeSetupDialog.cpp +++ b/Source/MFCDialog/CMakeSetupDialog.cpp @@ -286,7 +286,27 @@ BOOL CMakeSetupDialog::OnInitDialog() } if (m_GeneratorChoiceString == _T("")) { - m_GeneratorChoiceString = "Visual Studio 6"; + // check for vs7 in registry then decide what default to use + std::string mp; + mp = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.1;InstallDir]"; + cmSystemTools::ExpandRegistryValues(mp); + if (mp != "/registry") + { + m_GeneratorChoiceString = "Visual Studio 7 .NET 2003"; + } + else + { + mp = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.0;InstallDir]"; + cmSystemTools::ExpandRegistryValues(mp); + if (mp != "/registry") + { + m_GeneratorChoiceString = "Visual Studio 7"; + } + else + { + m_GeneratorChoiceString = "Visual Studio 6"; + } + } } // try to load the cmake cache from disk |