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.
This commit is contained in:
Gilles Khouzam
2016-06-17 14:24:21 -07:00
committed by Brad King
parent 313e966702
commit ed05f11dd2
6 changed files with 144 additions and 1 deletions
@@ -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() ||