[Cmake-commits] CMake branch, next, updated. v3.0.2-5475-g5736f05

Brad King brad.king at kitware.com
Fri Sep 26 15:01:42 EDT 2014


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  5736f05da25a5b5b7de4bf9cb5c2612320afc81f (commit)
       via  ddc5d69f7ed0fe0ed644e3a3b6996a6b706cb4d8 (commit)
      from  17049e24202ad12c115d657cdd429f50c2b7defb (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=5736f05da25a5b5b7de4bf9cb5c2612320afc81f
commit 5736f05da25a5b5b7de4bf9cb5c2612320afc81f
Merge: 17049e2 ddc5d69
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 26 15:01:42 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Sep 26 15:01:42 2014 -0400

    Merge topic 'vs-nsight-tegra-generator' into next
    
    ddc5d69f VS: Generate Nsight Tegra project revision number


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ddc5d69f7ed0fe0ed644e3a3b6996a6b706cb4d8
commit ddc5d69f7ed0fe0ed644e3a3b6996a6b706cb4d8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 26 14:57:30 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 26 14:57:30 2014 -0400

    VS: Generate Nsight Tegra project revision number
    
    Nsight Tegra 2.0 will be revision '8'.  Generate this revision number
    and add a NsightTegraUpgradeOnceWithoutPrompt element to tell newer
    versions not to prompt when upgrading the generated project file.

diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 21d1f34..d70d2af 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -620,6 +620,12 @@ bool cmGlobalVisualStudio10Generator::IsNsightTegra() const
 }
 
 //----------------------------------------------------------------------------
+std::string cmGlobalVisualStudio10Generator::GetNsightTegraVersion() const
+{
+  return this->NsightTegraVersion;
+}
+
+//----------------------------------------------------------------------------
 std::string cmGlobalVisualStudio10Generator::GetInstalledNsightTegraVersion()
 {
   std::string version;
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 1df98e3..3af7b51 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -61,6 +61,7 @@ public:
 
   /** Generating for Nsight Tegra VS plugin?  */
   bool IsNsightTegra() const;
+  std::string GetNsightTegraVersion() const;
 
   /** The toolset name for the target platform.  */
   const char* GetPlatformToolset() const;
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index cb19402..8ac12df 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -181,6 +181,14 @@ cmVisualStudio10TargetGenerator(cmTarget* target,
   this->GUID = this->GlobalGenerator->GetGUID(this->Name.c_str());
   this->Platform = gg->GetPlatformName();
   this->NsightTegra = gg->IsNsightTegra();
+  for(int i =
+        sscanf(gg->GetNsightTegraVersion().c_str(), "%u.%u.%u.%u",
+               &this->NsightTegraVersion[0], &this->NsightTegraVersion[1],
+               &this->NsightTegraVersion[2], &this->NsightTegraVersion[3]);
+      i < 4; ++i)
+    {
+    this->NsightTegraVersion[i] = 0;
+    }
   this->MSTools = !this->NsightTegra;
   this->TargetCompileAsWinRT = false;
   this->BuildFileStream = 0;
@@ -316,9 +324,24 @@ void cmVisualStudio10TargetGenerator::Generate()
   if(this->NsightTegra)
     {
     this->WriteString("<PropertyGroup Label=\"NsightTegraProject\">\n", 1);
-    this->WriteString("<NsightTegraProjectRevisionNumber>"
-                      "6"
-                      "</NsightTegraProjectRevisionNumber>\n", 2);
+    if(this->NsightTegraVersion[0] >= 2)
+      {
+      // Nsight Tegra 2.0 uses project revision 8.
+      this->WriteString("<NsightTegraProjectRevisionNumber>"
+                        "8"
+                        "</NsightTegraProjectRevisionNumber>\n", 2);
+      // Tell newer versions to upgrade silently when loading.
+      this->WriteString("<NsightTegraUpgradeOnceWithoutPrompt>"
+                        "true"
+                        "</NsightTegraUpgradeOnceWithoutPrompt>\n", 2);
+      }
+    else
+      {
+      // Require Nsight Tegra 1.6 for JCompile support.
+      this->WriteString("<NsightTegraProjectRevisionNumber>"
+                        "7"
+                        "</NsightTegraProjectRevisionNumber>\n", 2);
+      }
     this->WriteString("</PropertyGroup>\n", 1);
     }
 
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 36155f9..a02dfa8 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -142,6 +142,7 @@ private:
   std::string Name;
   bool MSTools;
   bool NsightTegra;
+  int  NsightTegraVersion[4];
   bool TargetCompileAsWinRT;
   cmGlobalVisualStudio10Generator* GlobalGenerator;
   cmGeneratedFileStream* BuildFileStream;

-----------------------------------------------------------------------

Summary of changes:
 Source/cmGlobalVisualStudio10Generator.cxx |    6 ++++++
 Source/cmGlobalVisualStudio10Generator.h   |    1 +
 Source/cmVisualStudio10TargetGenerator.cxx |   29 +++++++++++++++++++++++++---
 Source/cmVisualStudio10TargetGenerator.h   |    1 +
 4 files changed, 34 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list