summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-09-15 22:01:32 (GMT)
committerBrad King <brad.king@kitware.com>2012-09-18 18:02:01 (GMT)
commite17f3458ce8c5eaba53dc00d273d3456746c7fd4 (patch)
tree130c3549aca8845d4654bee9ea1438506d8873c3 /Source/cmake.cxx
parent875f3a4231766d9534304b3bb74a321c1bcd15d1 (diff)
downloadCMake-e17f3458ce8c5eaba53dc00d273d3456746c7fd4.zip
CMake-e17f3458ce8c5eaba53dc00d273d3456746c7fd4.tar.gz
CMake-e17f3458ce8c5eaba53dc00d273d3456746c7fd4.tar.bz2
VS11: Detect VS 2012 Express for default generator (#13348)
Add WDExpress to the list of registry search locations. Add VS 11 to the list of VS versions and corresponding generator names. Fix the search logic to use the most recent version found under any registry entry. Inspired-by: Peter Kümmel <syntheticpp@gmx.net>
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index c6787b9..079ea36 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2184,6 +2184,7 @@ int cmake::ActualConfigure()
std::vector<std::string> vsVerions;
vsVerions.push_back("VisualStudio\\");
vsVerions.push_back("VCExpress\\");
+ vsVerions.push_back("WDExpress\\");
struct VSRegistryEntryName
{
const char* MSVersion;
@@ -2196,10 +2197,11 @@ int cmake::ActualConfigure()
{"8.0", "Visual Studio 8 2005"},
{"9.0", "Visual Studio 9 2008"},
{"10.0", "Visual Studio 10"},
+ {"11.0", "Visual Studio 11"},
{0, 0}};
- for(size_t b=0; b < vsVerions.size() && installedCompiler.empty(); b++)
+ for(int i=0; version[i].MSVersion != 0; i++)
{
- for(int i =0; version[i].MSVersion != 0; i++)
+ for(size_t b=0; b < vsVerions.size(); b++)
{
std::string reg = vsregBase + vsVerions[b] + version[i].MSVersion;
reg += ";InstallDir]";
@@ -2208,6 +2210,7 @@ int cmake::ActualConfigure()
if (!(reg == "/registry"))
{
installedCompiler = version[i].GeneratorName;
+ break;
}
}
}