diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2016-06-13 19:27:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-06-17 15:46:23 (GMT) |
commit | e63151ff543bb665fea255713e2e643e64527517 (patch) | |
tree | 21ed366673a8deea535ec334ca4f63d90fef471d /Source/cmake.h | |
parent | 9e4725560493fdac423102469da6dbe1779383c4 (diff) | |
download | CMake-e63151ff543bb665fea255713e2e643e64527517.zip CMake-e63151ff543bb665fea255713e2e643e64527517.tar.gz CMake-e63151ff543bb665fea255713e2e643e64527517.tar.bz2 |
cmake: Add an option to control what files needs to be traced
Even in relatively small projects using `--trace` (and `--trace-expand`)
may produce a lot of output. When developing a custom module usually
one is interested in output of only a few particular modules.
Add a `--trace-source=<file>` option to enable tracing only a subset of
source files. The final output would be only from requested modules,
ignoring anything else not matched to given filename(s).
Diffstat (limited to 'Source/cmake.h')
-rw-r--r-- | Source/cmake.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmake.h b/Source/cmake.h index c5d7cbb..9ac6935 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -307,6 +307,14 @@ public: void SetTrace(bool b) { this->Trace = b; } bool GetTraceExpand() { return this->TraceExpand; } void SetTraceExpand(bool b) { this->TraceExpand = b; } + void AddTraceSource(std::string const& file) + { + this->TraceOnlyThisSources.push_back(file); + } + std::vector<std::string> const& GetTraceSources() const + { + return this->TraceOnlyThisSources; + } bool GetWarnUninitialized() { return this->WarnUninitialized; } void SetWarnUninitialized(bool b) { this->WarnUninitialized = b; } bool GetWarnUnused() { return this->WarnUnused; } @@ -481,6 +489,8 @@ private: cmState* State; cmState::Snapshot CurrentSnapshot; + std::vector<std::string> TraceOnlyThisSources; + void UpdateConversionPathTable(); // Print a list of valid generators to stderr. |