summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2015-07-21 21:18:53 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2015-07-23 19:33:10 (GMT)
commit594bafe52773c940fc3fb9cd9022a4d1a3a194c7 (patch)
tree9ba8747bc0a23a46abe7035e8f507b647573fbd9 /Source/cmake.cxx
parent265b9db7c2c865c5aad821bf9a377ea84dfe431e (diff)
downloadCMake-594bafe52773c940fc3fb9cd9022a4d1a3a194c7.zip
CMake-594bafe52773c940fc3fb9cd9022a4d1a3a194c7.tar.gz
CMake-594bafe52773c940fc3fb9cd9022a4d1a3a194c7.tar.bz2
cmake: add --trace-expand option
The --trace option is helpful, but sometimes, what you're looking for is deep under many layers of function calls and figuring out what instance of the function call you're looking at is tedious to determine (usually involving patching and message()). Instead, add a --trace-expand option to trace while expanding commands into what CMake actually sees.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 7bf3832..6abdbed 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -121,6 +121,7 @@ void cmWarnUnusedCliWarning(const std::string& variable,
cmake::cmake()
{
this->Trace = false;
+ this->TraceExpand = false;
this->WarnUninitialized = false;
this->WarnUnused = false;
this->WarnUnusedCli = true;
@@ -617,10 +618,17 @@ void cmake::SetArgs(const std::vector<std::string>& args,
std::cout << "Running with debug output on.\n";
this->SetDebugOutputOn(true);
}
+ else if(arg.find("--trace-expand",0) == 0)
+ {
+ std::cout << "Running with expanded trace output on.\n";
+ this->SetTrace(true);
+ this->SetTraceExpand(true);
+ }
else if(arg.find("--trace",0) == 0)
{
std::cout << "Running with trace output on.\n";
this->SetTrace(true);
+ this->SetTraceExpand(false);
}
else if(arg.find("--warn-uninitialized",0) == 0)
{