[Cmake-commits] CMake branch, next, updated. v2.8.12-4076-ge917cf1
Brad King
brad.king at kitware.com
Wed Oct 16 16:10:35 EDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via e917cf1bef98d2bfca950a79f7d1105797118f23 (commit)
via 4483fd9a3026d6b86e729aa21dff5e03a58a19de (commit)
via 519ab708dc0ca8445d6524796569777b608fcb30 (commit)
from beb45bd3599cd1abc844a6fb3f4eb8bb78487f3e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e917cf1bef98d2bfca950a79f7d1105797118f23
commit e917cf1bef98d2bfca950a79f7d1105797118f23
Merge: beb45bd 4483fd9
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 16 16:10:24 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Oct 16 16:10:24 2013 -0400
Merge topic 'vs-intel-compiler' into next
4483fd9 Intel: Fix .vfproj format version during compiler id detection
519ab70 Intel: Expose VS plugin version to CMake language
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4483fd9a3026d6b86e729aa21dff5e03a58a19de
commit 4483fd9a3026d6b86e729aa21dff5e03a58a19de
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 16 15:51:29 2013 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Oct 16 16:06:50 2013 -0400
Intel: Fix .vfproj format version during compiler id detection
Use CMAKE_VS_INTEL_Fortran_PROJECT_VERSION to set the .vfproj format
version.
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index d55fcdf..e591f2c 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -115,7 +115,7 @@ Id flags: ${testflags}
set(id_lang "${lang}")
set(id_cl cl.exe)
if(lang STREQUAL Fortran)
- set(v Intel-11)
+ set(v Intel)
set(ext vfproj)
set(id_cl ifort.exe)
elseif(NOT "${vs_version}" VERSION_LESS 10)
diff --git a/Modules/CompilerId/VS-Intel-11.vfproj.in b/Modules/CompilerId/VS-Intel.vfproj.in
similarity index 95%
rename from Modules/CompilerId/VS-Intel-11.vfproj.in
rename to Modules/CompilerId/VS-Intel.vfproj.in
index 4128513..044dd20 100644
--- a/Modules/CompilerId/VS-Intel-11.vfproj.in
+++ b/Modules/CompilerId/VS-Intel.vfproj.in
@@ -2,7 +2,7 @@
<VisualStudioProject
ProjectCreator="Intel Fortran"
Keyword="Console Application"
- Version="11.0"
+ Version="@CMAKE_VS_INTEL_Fortran_PROJECT_VERSION@"
ProjectIdGuid="{AB67BAB7-D7AE-4E97-B492-FE5420447509}"
>
<Platforms>
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=519ab708dc0ca8445d6524796569777b608fcb30
commit 519ab708dc0ca8445d6524796569777b608fcb30
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 16 15:48:44 2013 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Oct 16 16:06:02 2013 -0400
Intel: Expose VS plugin version to CMake language
Lookup the Intel VS plugin version on construction of the VS global
generator and compute from it the .vfproj format version number. Add it
as a CMAKE_VS_INTEL_Fortran_PROJECT_VERSION platform definition.
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 99c782d..2311ac8 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -61,6 +61,7 @@ Variables that Provide Information
/variable/CMAKE_TWEAK_VERSION
/variable/CMAKE_VERBOSE_MAKEFILE
/variable/CMAKE_VERSION
+ /variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION
/variable/CMAKE_VS_PLATFORM_TOOLSET
/variable/CMAKE_XCODE_PLATFORM_TOOLSET
/variable/PROJECT_BINARY_DIR
diff --git a/Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst b/Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst
new file mode 100644
index 0000000..7e9d317
--- /dev/null
+++ b/Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst
@@ -0,0 +1,7 @@
+CMAKE_VS_INTEL_Fortran_PROJECT_VERSION
+--------------------------------------
+
+When generating for Visual Studio 7 or greater with the Intel Fortran
+plugin installed, this specifies the .vfproj project file format
+version. This is intended for internal use by CMake and should not be
+used by project code.
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 9db3c0c..6740be7 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -21,6 +21,7 @@ cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator(
const char* platformName)
{
this->FindMakeProgramFile = "CMakeVS7FindMake.cmake";
+ this->InitIntelProjectVersion();
if (!platformName)
{
@@ -29,6 +30,36 @@ cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator(
this->PlatformName = platformName;
}
+// Package GUID of Intel Visual Fortran plugin to VS IDE
+#define CM_INTEL_PLUGIN_GUID "{B68A201D-CB9B-47AF-A52F-7EEC72E217E4}"
+
+void cmGlobalVisualStudio7Generator::InitIntelProjectVersion()
+{
+ // 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 = this->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.
+ }
+ this->IntelProjectVersion = intelVersion;
+}
void cmGlobalVisualStudio7Generator
::EnableLanguage(std::vector<std::string>const & lang,
@@ -155,6 +186,8 @@ void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf)
{
cmGlobalVisualStudioGenerator::AddPlatformDefinitions(mf);
mf->AddDefinition("CMAKE_VS_PLATFORM_NAME", this->GetPlatformName());
+ mf->AddDefinition("CMAKE_VS_INTEL_Fortran_PROJECT_VERSION",
+ this->IntelProjectVersion.c_str());
}
void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf)
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 4d22cff..d586a6b 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -101,6 +101,8 @@ public:
LinkLibraryDependencies and link to .sln dependencies. */
virtual bool NeedLinkLibraryDependencies(cmTarget&) { return false; }
+ std::string const& GetIntelProjectVersion() const
+ { return this->IntelProjectVersion; }
protected:
virtual const char* GetIDEVersion() { return "7.0"; }
@@ -159,6 +161,10 @@ protected:
// There is one SLN file per project.
std::string CurrentProject;
std::string PlatformName;
+
+private:
+ void InitIntelProjectVersion();
+ std::string IntelProjectVersion;
};
#define CMAKE_CHECK_BUILD_SYSTEM_TARGET "ZERO_CHECK"
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)
{
-----------------------------------------------------------------------
Summary of changes:
Help/manual/cmake-variables.7.rst | 1 +
.../CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst | 7 ++++
Modules/CMakeDetermineCompilerId.cmake | 2 +-
.../{VS-Intel-11.vfproj.in => VS-Intel.vfproj.in} | 2 +-
Source/cmGlobalVisualStudio7Generator.cxx | 33 ++++++++++++++++++++
Source/cmGlobalVisualStudio7Generator.h | 6 +++
Source/cmLocalVisualStudio7Generator.cxx | 30 +-----------------
7 files changed, 50 insertions(+), 31 deletions(-)
create mode 100644 Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst
rename Modules/CompilerId/{VS-Intel-11.vfproj.in => VS-Intel.vfproj.in} (95%)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list