diff options
author | Brad King <brad.king@kitware.com> | 2013-10-16 19:48:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-18 13:55:50 (GMT) |
commit | b8522a8c8a64d6f86dc3618f658b07f7ba1d8fcd (patch) | |
tree | 595a479e15fec6073888b24455085ee49c28f8ba /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 2d36c9ab60f9d1fa5304ebf23b09fa79ff8b667e (diff) | |
download | CMake-b8522a8c8a64d6f86dc3618f658b07f7ba1d8fcd.zip CMake-b8522a8c8a64d6f86dc3618f658b07f7ba1d8fcd.tar.gz CMake-b8522a8c8a64d6f86dc3618f658b07f7ba1d8fcd.tar.bz2 |
VS: Expose Intel Fortran .vfproj format version to CMake language
Lookup the Intel VS plugin version on demand in the VS global generator,
compute the corresponding .vfproj format version number, and memoize it.
Add it as a CMAKE_VS_INTEL_Fortran_PROJECT_VERSION platform definition.
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 64de448..f21abc3 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -27,9 +27,6 @@ #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); class cmLocalVisualStudio7GeneratorInternals @@ -1961,35 +1958,10 @@ cmLocalVisualStudio7Generator 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; - std::string vskey = gg->GetRegistryBase(); - vskey += "\\Packages\\" CM_INTEL_PLUGIN_GUID ";ProductVersion"; - cmSystemTools::ReadRegistryValue(vskey.c_str(), intelVersion, - cmSystemTools::KeyWOW64_32); - unsigned int intelVersionNumber = ~0u; - sscanf(intelVersion.c_str(), "%u", &intelVersionNumber); - if(intelVersionNumber >= 11) - { - // Default to latest known project file version. - intelVersion = "11.0"; - } - else if(intelVersionNumber == 10) - { - // Version 10.x actually uses 9.10 in project files! - intelVersion = "9.10"; - } - else - { - // Version <= 9: use ProductVersion from registry. - } - fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n" << "<VisualStudioProject\n" << "\tProjectCreator=\"Intel Fortran\"\n" - << "\tVersion=\"" << intelVersion << "\"\n"; + << "\tVersion=\"" << gg->GetIntelProjectVersion() << "\"\n"; const char* keyword = target.GetProperty("VS_KEYWORD"); if(!keyword) { |