From 69e198dc3fd0e0d16a7b4fe5bcda4c6e1e77ea2f Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 26 Sep 2014 14:57:30 -0400 Subject: 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. --- Source/cmVisualStudio10TargetGenerator.cxx | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'Source/cmVisualStudio10TargetGenerator.cxx') diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index b42bf90da3..8ac12dfe3c 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("\n", 1); - this->WriteString("" - "7" - "\n", 2); + if(this->NsightTegraVersion[0] >= 2) + { + // Nsight Tegra 2.0 uses project revision 8. + this->WriteString("" + "8" + "\n", 2); + // Tell newer versions to upgrade silently when loading. + this->WriteString("" + "true" + "\n", 2); + } + else + { + // Require Nsight Tegra 1.6 for JCompile support. + this->WriteString("" + "7" + "\n", 2); + } this->WriteString("\n", 1); } -- cgit v1.2.1