[Cmake-commits] [cmake-commits] king committed cmLocalVisualStudio7Generator.cxx 1.250 1.251

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Sep 16 11:44:55 EDT 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv32335/Source

Modified Files:
	cmLocalVisualStudio7Generator.cxx 
Log Message:
Generate proper Intel Fortran project version

The Intel Visual Fortran compiler plugin for MS Visual Studio may be one
of several versions of the Intel compiler.  This commit teaches CMake to
detect the plugin version and set the version number in .vfproj files.
See issue #9169.


Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.250
retrieving revision 1.251
diff -C 2 -d -r1.250 -r1.251
*** cmLocalVisualStudio7Generator.cxx	2 Sep 2009 20:07:12 -0000	1.250
--- cmLocalVisualStudio7Generator.cxx	16 Sep 2009 15:44:50 -0000	1.251
***************
*** 32,35 ****
--- 32,38 ----
  #include <ctype.h> // for isspace
  
+ // Package GUID of Intel Visual Fortran plugin to VS IDE
+ #define CM_INTEL_PLUGIN_GUID "{B68A201D-CB9B-47AF-A52F-7EEC72E217E4}"
+ 
  static bool cmLVS6G_IsFAT(const char* dir);
  
***************
*** 1676,1683 ****
    cmGlobalVisualStudio7Generator* gg =
      static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator);
    fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n"
         << "<VisualStudioProject\n"
         << "\tProjectCreator=\"Intel Fortran\"\n"
!        << "\tVersion=\"9.10\"\n";
    const char* keyword = target.GetProperty("VS_KEYWORD");
    if(!keyword)
--- 1679,1695 ----
    cmGlobalVisualStudio7Generator* gg =
      static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator);
+ 
+   // Compute the version of the Intel plugin to the VS IDE.
+   // If the key does not exist then use a default guess.
+   std::string intelVersion = "9.10";
+   std::string vskey = gg->GetRegistryBase();
+   vskey += "\\Packages\\" CM_INTEL_PLUGIN_GUID ";ProductVersion";
+   cmSystemTools::ReadRegistryValue(vskey.c_str(), intelVersion,
+                                    cmSystemTools::KeyWOW64_32);
+ 
    fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n"
         << "<VisualStudioProject\n"
         << "\tProjectCreator=\"Intel Fortran\"\n"
!        << "\tVersion=\"" << intelVersion << "\"\n";
    const char* keyword = target.GetProperty("VS_KEYWORD");
    if(!keyword)



More information about the Cmake-commits mailing list