From 5365c9ac377ab6f579a1af32c4bfbec798417efb Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 24 Sep 2014 14:27:18 -0400 Subject: [PATCH] VS: Map Nsight Tegra file types in .vcxproj files Map ".java" to JCompile, ".asm" and ".s" to ClCompile, and a few Android-specific source file names to AndroidBuild. This allows Nsight Tegra 1.6 and above to check up-to-dateness of such sources. Bump NsightTegraProjectRevisionNumber to 7 to allow these fields. --- Source/cmVisualStudio10TargetGenerator.cxx | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index b0c84e3de..b42bf90da 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -317,7 +317,7 @@ void cmVisualStudio10TargetGenerator::Generate() { this->WriteString("\n", 1); this->WriteString("" - "6" + "7" "\n", 2); this->WriteString("\n", 1); } @@ -1200,6 +1200,28 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) { tool = "XML"; } + if(this->NsightTegra) + { + // Nsight Tegra needs specific file types to check up-to-dateness. + std::string name = + cmSystemTools::LowerCase(sf->GetLocation().GetName()); + if(name == "androidmanifest.xml" || + name == "build.xml" || + name == "proguard.cfg" || + name == "proguard-project.txt" || + ext == "properties") + { + tool = "AndroidBuild"; + } + else if(ext == "java") + { + tool = "JCompile"; + } + else if(ext == "asm" || ext == "s") + { + tool = "ClCompile"; + } + } std::string deployContent; if(this->GlobalGenerator->TargetsWindowsPhone() ||