View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012917CMake(No Category)public2012-01-28 08:012012-09-03 16:02
ReporterPeter Kuemmel 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformWindowsOSOS Version
Product VersionCMake 2.8.7 
Target VersionCMake 2.8.8Fixed in VersionCMake 2.8.8 
Summary0012917: Find Visual C++ Express
DescriptionCMake doesn't find Visual C++ Express and uses "NMake Makefiles" generator by default.

https://github.com/Kitware/CMake/pull/14 [^]
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0028417)
Rolf Eike Beer (developer)
2012-01-28 11:58

Please describe what exactly you did? Just checked out the code and typed "cmake /my/source/dir"? Then specify the correct generator using the -G option. Run "cmake --help" to get a list of all supported generators and their exact spelling.
(0028418)
Peter Kuemmel (developer)
2012-01-28 13:46

What I did: I called cmake WITHOUT using the -G options.

Without the patch cmake didn't find VC Express and generates "NMake Makefiles" when no -G option is given.

But cmake should generate Visual Studio project files when a version of Studio is installed, this also says the code, cmake.cxx line 2205:

      // Try to find the newest VS installed on the computer and
      // use that as a default if -G is not specified

With the patch cmake could find VCExpress and generates projects files WITHOUT using -G.
(0028420)
Brad King (manager)
2012-01-30 08:55

In this hunk:

-      std::string vsregBase =
-        "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\";
+      std::vector<std::string> vsregBases;
+      vsregBases.push_back
+          ("[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\");
+      vsregBases.push_back
+          ("[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\");
+      vsregBases.push_back
+          ("[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\");
+      vsregBases.push_back
+          ("[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VCExpress\\");


You shouldn't need to list both registry views here. VS is always
installed as a 32-bit application. Just change the call

  cmSystemTools::ExpandRegistryValues(reg);

to

  cmSystemTools::ExpandRegistryValues(reg, cmSystemTools::KeyWOW64_32);

to tell CMake to check the 32-bit view even if it is a 64-bit build.
(0028424)
Peter Kuemmel (developer)
2012-01-30 14:02

OK, now the patch uses cmSystemTools::KeyWOW64_32.

I also removed the string duplication.
(0028425)
Brad King (manager)
2012-01-30 14:19

Applied, thanks:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=453b9e38 [^]
(0030877)
David Cole (manager)
2012-09-03 16:02

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-01-28 08:01 Peter Kuemmel New Issue
2012-01-28 11:58 Rolf Eike Beer Note Added: 0028417
2012-01-28 13:46 Peter Kuemmel Note Added: 0028418
2012-01-30 08:55 Brad King Note Added: 0028420
2012-01-30 14:02 Peter Kuemmel Note Added: 0028424
2012-01-30 14:19 Brad King Note Added: 0028425
2012-01-30 14:19 Brad King Status new => resolved
2012-01-30 14:19 Brad King Resolution open => fixed
2012-01-30 14:19 Brad King Assigned To => Brad King
2012-04-19 15:45 David Cole Fixed in Version => CMake 2.8.8
2012-04-19 15:45 David Cole Target Version => CMake 2.8.8
2012-09-03 16:02 David Cole Note Added: 0030877
2012-09-03 16:02 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team