VS: Future-proof Intel project format selection
The version of Intel Fortran that actually uses 9.10 as a project format is very old. Default to the latest format version (11.0) and use the older format only when known to be necessary. Suggested-by: Dick Munroe <munroe@csworks.com>
This commit is contained in:
parent
b2ce2f5e48
commit
cd90a0eadd
@ -1954,23 +1954,27 @@ cmLocalVisualStudio7Generator
|
|||||||
|
|
||||||
// Compute the version of the Intel plugin to the VS IDE.
|
// Compute the version of the Intel plugin to the VS IDE.
|
||||||
// If the key does not exist then use a default guess.
|
// If the key does not exist then use a default guess.
|
||||||
std::string intelVersion = "9.10";
|
std::string intelVersion;
|
||||||
std::string vskey = gg->GetRegistryBase();
|
std::string vskey = gg->GetRegistryBase();
|
||||||
vskey += "\\Packages\\" CM_INTEL_PLUGIN_GUID ";ProductVersion";
|
vskey += "\\Packages\\" CM_INTEL_PLUGIN_GUID ";ProductVersion";
|
||||||
cmSystemTools::ReadRegistryValue(vskey.c_str(), intelVersion,
|
cmSystemTools::ReadRegistryValue(vskey.c_str(), intelVersion,
|
||||||
cmSystemTools::KeyWOW64_32);
|
cmSystemTools::KeyWOW64_32);
|
||||||
if (intelVersion.find("13") == 0 ||
|
unsigned int intelVersionNumber = ~0u;
|
||||||
intelVersion.find("12") == 0 ||
|
sscanf(intelVersion.c_str(), "%u", &intelVersionNumber);
|
||||||
intelVersion.find("11") == 0)
|
if(intelVersionNumber >= 11)
|
||||||
{
|
{
|
||||||
// Version 11.x, 12.x, and 13.x actually use 11.0 in project files!
|
// Default to latest known project file version.
|
||||||
intelVersion = "11.0" ;
|
intelVersion = "11.0";
|
||||||
}
|
}
|
||||||
else if(intelVersion.find("10") == 0)
|
else if(intelVersionNumber == 10)
|
||||||
{
|
{
|
||||||
// Version 10.x actually uses 9.10 in project files!
|
// Version 10.x actually uses 9.10 in project files!
|
||||||
intelVersion = "9.10";
|
intelVersion = "9.10";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Version <= 9: use ProductVersion from registry.
|
||||||
|
}
|
||||||
|
|
||||||
fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n"
|
fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n"
|
||||||
<< "<VisualStudioProject\n"
|
<< "<VisualStudioProject\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user