diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2022-10-06 18:40:32 (GMT) |
---|---|---|
committer | Matthew Woehlke <matthew.woehlke@kitware.com> | 2022-10-11 16:10:18 (GMT) |
commit | 5ba51621af43dbb84a12a5eff6740f45b8ab0cb0 (patch) | |
tree | 8bc95c99ef20874120e08df842700e5a0ec03d2f /Source/cmake.h | |
parent | 7629a1182cf9006e4e83c1094794d935503dd079 (diff) | |
download | CMake-5ba51621af43dbb84a12a5eff6740f45b8ab0cb0.zip CMake-5ba51621af43dbb84a12a5eff6740f45b8ab0cb0.tar.gz CMake-5ba51621af43dbb84a12a5eff6740f45b8ab0cb0.tar.bz2 |
try_compile: Propagate --trace through try_compile
Add ability to specify another cmake instance from which to get the
trace output target. Use this during try_compile.
Diffstat (limited to 'Source/cmake.h')
-rw-r--r-- | Source/cmake.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmake.h b/Source/cmake.h index 54d0bb5..5b5425c 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -513,10 +513,19 @@ public: { return this->TraceOnlyThisSources; } - cmGeneratedFileStream& GetTraceFile() { return this->TraceFile; } + cmGeneratedFileStream& GetTraceFile() + { + if (this->TraceRedirect) { + return this->TraceRedirect->GetTraceFile(); + } + return this->TraceFile; + } void SetTraceFile(std::string const& file); void PrintTraceFormatVersion(); + //! Use trace from another ::cmake instance. + void SetTraceRedirect(cmake* other); + bool GetWarnUninitialized() const { return this->WarnUninitialized; } void SetWarnUninitialized(bool b) { this->WarnUninitialized = b; } bool GetWarnUnusedCli() const { return this->WarnUnusedCli; } @@ -677,6 +686,7 @@ private: bool TraceExpand = false; TraceFormat TraceFormatVar = TRACE_HUMAN; cmGeneratedFileStream TraceFile; + cmake* TraceRedirect = nullptr; bool WarnUninitialized = false; bool WarnUnusedCli = true; bool CheckSystemVars = false; |