diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-10-04 21:18:26 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2019-12-19 13:09:49 (GMT) |
commit | a7ea20649d4593bbad70b8a99aab4c2bf6294b79 (patch) | |
tree | 496c17d157b5c2f8e8c56b3ebc4bbefaa549d1bd /Source/cmMakefile.cxx | |
parent | 3289322e4f05ef4f092d6ed0bc0b57d66c911c64 (diff) | |
download | CMake-a7ea20649d4593bbad70b8a99aab4c2bf6294b79.zip CMake-a7ea20649d4593bbad70b8a99aab4c2bf6294b79.tar.gz CMake-a7ea20649d4593bbad70b8a99aab4c2bf6294b79.tar.bz2 |
find_*: Add debug logging infrastructure
Enable debug messages a new `--find-debug` command-line option or via
the `CMAKE_FIND_DEBUG_MODE` variable.
This work was started by Chris Wilson, continued by Ray Donnelly, and
then refactored by Robert Maynard to collect information into a single
message per find query.
Co-Author: Ray Donnelly <mingw.android@gmail.com>
Co-Author: Chris Wilson <chris+github@qwirx.com>
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 74cc831..0ad482c 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3728,7 +3728,8 @@ void cmMakefile::DisplayStatus(const std::string& message, float s) const } std::string cmMakefile::GetModulesFile(const std::string& filename, - bool& system) const + bool& system, bool debug, + std::string& debugBuffer) const { std::string result; @@ -3759,6 +3760,9 @@ std::string cmMakefile::GetModulesFile(const std::string& filename, moduleInCMakeModulePath = itempl; break; } + if (debug) { + debugBuffer = cmStrCat(debugBuffer, " ", itempl, "\n"); + } } } @@ -3767,6 +3771,9 @@ std::string cmMakefile::GetModulesFile(const std::string& filename, cmStrCat(cmSystemTools::GetCMakeRoot(), "/Modules/", filename); cmSystemTools::ConvertToUnixSlashes(moduleInCMakeRoot); if (!cmSystemTools::FileExists(moduleInCMakeRoot)) { + if (debug) { + debugBuffer = cmStrCat(debugBuffer, " ", moduleInCMakeRoot, "\n"); + } moduleInCMakeRoot.clear(); } |