mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 22:31:18 -05:00
sourceFile properties: add property INCLUDE_DIRECTORIES
This commit is contained in:
@@ -1396,6 +1396,7 @@ struct cmLVS7GFileConfig
|
||||
std::string CompileDefs;
|
||||
std::string CompileDefsConfig;
|
||||
std::string AdditionalDeps;
|
||||
std::string IncludeDirs;
|
||||
bool ExcludedFromBuild;
|
||||
};
|
||||
|
||||
@@ -1484,6 +1485,12 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo(
|
||||
needfc = true;
|
||||
}
|
||||
|
||||
const std::string INCLUDE_DIRECTORIES("INCLUDE_DIRECTORIES");
|
||||
if (const char* cincs = sf.GetProperty(INCLUDE_DIRECTORIES)) {
|
||||
fc.IncludeDirs = genexInterpreter.Evaluate(cincs, INCLUDE_DIRECTORIES);
|
||||
needfc = true;
|
||||
}
|
||||
|
||||
// Check for extra object-file dependencies.
|
||||
if (const char* deps = sf.GetProperty("OBJECT_DEPENDS")) {
|
||||
std::vector<std::string> depends;
|
||||
@@ -1661,7 +1668,7 @@ bool cmLocalVisualStudio7Generator::WriteGroup(
|
||||
fout << "\t\t\t\t\t<Tool\n"
|
||||
<< "\t\t\t\t\tName=\"" << aCompilerTool << "\"\n";
|
||||
if (!fc.CompileFlags.empty() || !fc.CompileDefs.empty() ||
|
||||
!fc.CompileDefsConfig.empty()) {
|
||||
!fc.CompileDefsConfig.empty() || !fc.IncludeDirs.empty()) {
|
||||
Options::Tool tool = Options::Compiler;
|
||||
cmVS7FlagTable const* table =
|
||||
cmLocalVisualStudio7GeneratorFlagTable;
|
||||
@@ -1673,6 +1680,10 @@ bool cmLocalVisualStudio7Generator::WriteGroup(
|
||||
fileOptions.Parse(fc.CompileFlags.c_str());
|
||||
fileOptions.AddDefines(fc.CompileDefs.c_str());
|
||||
fileOptions.AddDefines(fc.CompileDefsConfig.c_str());
|
||||
// validate source level include directories
|
||||
std::vector<std::string> includes;
|
||||
this->AppendIncludeDirectories(includes, fc.IncludeDirs, **sf);
|
||||
fileOptions.AddIncludes(includes);
|
||||
fileOptions.OutputFlagMap(fout, "\t\t\t\t\t");
|
||||
fileOptions.OutputAdditionalIncludeDirectories(
|
||||
fout, "\t\t\t\t\t", "\n",
|
||||
|
||||
Reference in New Issue
Block a user