summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorGilles Khouzam <gillesk@microsoft.com>2016-06-17 14:24:21 -0700
committerBrad King <brad.king@kitware.com>2016-06-20 10:46:14 -0400
commited05f11dd27d668791887f32e2c7be00753cfdb5 (patch)
treea1d88212b3c218f7afbf3773252b68fdeed67f02 /Source
parent313e9667021a510151117d8222e958174b691261 (diff)
downloadcmake-ed05f11dd27d668791887f32e2c7be00753cfdb5.tar.gz
VS: Add a VS_TOOL_OVERRIDE source file property
This property allow to specify a specific Visual Studio tool for a source file overriding the default tool behavior. For example, a `.resw` file being processed as a `PriResource` file. This has the advantage of being able to teach CMake to process new file types without code modifications.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 3b1cddb620..ed84befdf5 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1203,6 +1203,11 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
}
}
+ const char* toolOverride = sf->GetProperty("VS_TOOL_OVERRIDE");
+ if (toolOverride && *toolOverride) {
+ tool = toolOverride;
+ }
+
std::string deployContent;
std::string deployLocation;
if (this->GlobalGenerator->TargetsWindowsPhone() ||