diff --git a/Help/prop_dir/INCLUDE_REGULAR_EXPRESSION.rst b/Help/prop_dir/INCLUDE_REGULAR_EXPRESSION.rst index befafa58c5a3d5675fd3e7b47b810700722b3746..bb90c61a7386efb4bb4c50bbcbd426be6025145b 100644 --- a/Help/prop_dir/INCLUDE_REGULAR_EXPRESSION.rst +++ b/Help/prop_dir/INCLUDE_REGULAR_EXPRESSION.rst @@ -3,6 +3,7 @@ INCLUDE_REGULAR_EXPRESSION Include file scanning regular expression. -This read-only property specifies the regular expression used during +This property specifies the regular expression used during dependency scanning to match include files that should be followed. -See the include_regular_expression command. +See the :command:`include_regular_expression` command for a high-level +interface to set this property. diff --git a/Source/cmMakeDepend.cxx b/Source/cmMakeDepend.cxx index a6d4e58aa3cfac7a94bd366e48b8aab9ddb70998..cbc7e02995a2c736e475749a846658d12e2a4bd7 100644 --- a/Source/cmMakeDepend.cxx +++ b/Source/cmMakeDepend.cxx @@ -49,7 +49,7 @@ void cmMakeDepend::SetMakefile(cmMakefile* makefile) // Now extract the include file regular expression from the makefile. this->IncludeFileRegularExpression.compile( - this->Makefile->IncludeFileRegularExpression.c_str()); + this->Makefile->GetIncludeRegularExpression()); this->ComplainFileRegularExpression.compile( this->Makefile->ComplainFileRegularExpression.c_str()); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 07c2fd15bc0045f2e432020dcf6757293a14a11e..155c3063619d01f440d1b9aba02c65f2cf0b3511 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -150,7 +150,7 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator) this->SuppressWatches = false; // Setup the default include file regular expression (match everything). - this->IncludeFileRegularExpression = "^.*$"; + this->SetProperty("INCLUDE_REGULAR_EXPRESSION", "^.*$"); // Setup the default include complaint regular expression (match nothing). this->ComplainFileRegularExpression = "^$"; // Source and header file extensions that we can handle @@ -1613,7 +1613,6 @@ void cmMakefile::InitializeFromParent(cmMakefile* parent) this->ProjectName = parent->ProjectName; // Copy include regular expressions. - this->IncludeFileRegularExpression = parent->IncludeFileRegularExpression; this->ComplainFileRegularExpression = parent->ComplainFileRegularExpression; // Imported targets. @@ -4193,12 +4192,6 @@ void cmMakefile::SetProperty(const std::string& prop, const char* value) return; } - if ( prop == "INCLUDE_REGULAR_EXPRESSION" ) - { - this->SetIncludeRegularExpression(value); - return; - } - this->Properties.SetProperty(prop, value); } @@ -4265,11 +4258,6 @@ const char *cmMakefile::GetProperty(const std::string& prop, } return ""; } - else if (prop == "INCLUDE_REGULAR_EXPRESSION" ) - { - output = this->GetIncludeRegularExpression(); - return output.c_str(); - } else if (prop == "LISTFILE_STACK") { output = cmJoin(this->ListFileStack, ";"); diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 82a2279402eb7b51b219f1c1169f7ac075a72608..585880e90a5173f08482a93208c31ed8d8ca6adb 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -387,11 +387,11 @@ public: */ void SetIncludeRegularExpression(const char* regex) { - this->IncludeFileRegularExpression = regex; + this->SetProperty("INCLUDE_REGULAR_EXPRESSION", regex); } const char* GetIncludeRegularExpression() const { - return this->IncludeFileRegularExpression.c_str(); + return this->GetProperty("INCLUDE_REGULAR_EXPRESSION"); } /** @@ -873,7 +873,6 @@ protected: std::vector<cmInstallGenerator*> InstallGenerators; std::vector<cmTestGenerator*> TestGenerators; - std::string IncludeFileRegularExpression; std::string ComplainFileRegularExpression; std::vector<std::string> SourceFileExtensions; std::vector<std::string> HeaderFileExtensions;