diff options
author | Brad King <brad.king@kitware.com> | 2008-05-14 15:54:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-05-14 15:54:52 (GMT) |
commit | a1bb7e90ef878c41f9725f0f7000b027f8dcd14a (patch) | |
tree | b4a43d18ca91d43c657f1314b514d6aee45bbdb8 /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | 7652a8a1e5cd7095afee45c8212d4c23e5fef599 (diff) | |
download | CMake-a1bb7e90ef878c41f9725f0f7000b027f8dcd14a.zip CMake-a1bb7e90ef878c41f9725f0f7000b027f8dcd14a.tar.gz CMake-a1bb7e90ef878c41f9725f0f7000b027f8dcd14a.tar.bz2 |
ENH: Allow users to specify macro-like #include line transforms for dependency scanning.
- Define IMPLICIT_DEPENDS_INCLUDE_TRANSFORM property on targets and directories.
- Make the directory version inherited.
- See issue #6648.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 50921be..38ceba6 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1875,6 +1875,32 @@ void cmLocalUnixMakefileGenerator3 cmakefileStream << " )\n"; } + + // Store include transform rule properties. Write the directory + // rules first because they may be overridden by later target rules. + std::vector<std::string> transformRules; + if(const char* xform = + this->Makefile->GetProperty("IMPLICIT_DEPENDS_INCLUDE_TRANSFORM")) + { + cmSystemTools::ExpandListArgument(xform, transformRules); + } + if(const char* xform = + target.GetProperty("IMPLICIT_DEPENDS_INCLUDE_TRANSFORM")) + { + cmSystemTools::ExpandListArgument(xform, transformRules); + } + if(!transformRules.empty()) + { + cmakefileStream + << "SET(CMAKE_INCLUDE_TRANSFORMS\n"; + for(std::vector<std::string>::const_iterator tri = transformRules.begin(); + tri != transformRules.end(); ++tri) + { + cmakefileStream << " " << this->EscapeForCMake(tri->c_str()) << "\n"; + } + cmakefileStream + << " )\n"; + } } //---------------------------------------------------------------------------- |