Skip to content

Commit

Permalink
UseSWIG: Automatically scan dependencies of SWIG files for Makefiles
Browse files Browse the repository at this point in the history
Issue: #4147
  • Loading branch information
DarthGandalf authored and bradking committed Jan 10, 2017
1 parent 4918cd8 commit b8968b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Copyright.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The following individuals and institutions are among the Contributors:
* Aleksey Avdeev <solo@altlinux.ru>
* Alexander Neundorf <neundorf@kde.org>
* Alexander Smorkalov <alexander.smorkalov@itseez.com>
* Alexey Sokolov <sokolov@google.com>
* Alex Turbov <i.zaufi@gmail.com>
* Andreas Pakulat <apaku@gmx.de>
* Andreas Schneider <asn@cryptomilk.org>
Expand All @@ -54,6 +55,7 @@ The following individuals and institutions are among the Contributors:
* Eran Ifrah <eran.ifrah@gmail.com>
* Esben Mose Hansen, Ange Optimization ApS
* Geoffrey Viola <geoffrey.viola@asirobots.com>
* Google Inc
* Gregor Jasny
* Helio Chissini de Castro <helio@kde.org>
* Ilya Lavrenov <ilya.lavrenov@itseez.com>
Expand Down
1 change: 1 addition & 0 deletions Modules/UseSWIG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
"${swig_source_file_fullname}"
MAIN_DEPENDENCY "${swig_source_file_fullname}"
DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
IMPLICIT_DEPENDS CXX "${swig_source_file_fullname}"
COMMENT "Swig source")
set_source_files_properties("${swig_generated_file_fullname}" ${swig_extra_generated_files}
PROPERTIES GENERATED 1)
Expand Down
4 changes: 2 additions & 2 deletions Source/cmDependsC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "cmSystemTools.h"

#define INCLUDE_REGEX_LINE \
"^[ \t]*#[ \t]*(include|import)[ \t]*[<\"]([^\">]+)([\">])"
"^[ \t]*[#%][ \t]*(include|import)[ \t]*[<\"]([^\">]+)([\">])"

#define INCLUDE_REGEX_LINE_MARKER "#IncludeRegexLine: "
#define INCLUDE_REGEX_SCAN_MARKER "#IncludeRegexScan: "
Expand Down Expand Up @@ -420,7 +420,7 @@ void cmDependsC::SetupTransforms()
if (!this->TransformRules.empty()) {
// Construct the regular expression to match lines to be
// transformed.
std::string xform = "^([ \t]*#[ \t]*(include|import)[ \t]*)(";
std::string xform = "^([ \t]*[#%][ \t]*(include|import)[ \t]*)(";
const char* sep = "";
for (TransformRulesType::const_iterator tri = this->TransformRules.begin();
tri != this->TransformRules.end(); ++tri) {
Expand Down

0 comments on commit b8968b4

Please sign in to comment.