diff options
author | Gilles Khouzam <gillesk@microsoft.com> | 2016-06-17 21:24:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-06-20 14:46:14 (GMT) |
commit | ed05f11dd27d668791887f32e2c7be00753cfdb5 (patch) | |
tree | a1d88212b3c218f7afbf3773252b68fdeed67f02 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 313e9667021a510151117d8222e958174b691261 (diff) | |
download | CMake-ed05f11dd27d668791887f32e2c7be00753cfdb5.zip CMake-ed05f11dd27d668791887f32e2c7be00753cfdb5.tar.gz CMake-ed05f11dd27d668791887f32e2c7be00753cfdb5.tar.bz2 |
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/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 3b1cddb..ed84bef 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() || |