[PATCH] D62353: [cmake] Add new LLVM_CACHE_VARIABLES variable to contains all variables passed to cmake on the commandline or in cache files.

Don Hinton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 24 08:50:43 PDT 2019


hintonda added a comment.

In D62353#1515251 <https://reviews.llvm.org/D62353#1515251>, @labath wrote:

> I'm somewhat worried about the fact that this only works for the very first cmake run. Reconfiguring an existing build tree is something that is normally supported by cmake. I don't know about others, but I do that relatively frequently. gui tools like ccmake cannot even work without making multiple cmake invocations (they do one run to fetch the list of cache variables, let the user change that, and then one run to reconfigure)..


Thanks for bringing this up.

I think I might be able to handle it by examining the cache file, which isn't written until the config process is complete.  Which means it's available as a history, and only needs to be examined on subsequent runs.  So, I should be able to gather variables on each run and grow my list as I go.  Even if a subsequent run excludes a variable or changes it back to a default, I'll still consider it changed.

I don't think cmake provides any mechanism for this, so it'll probably require a little python script, but it's essentially just an intelligent diff.  I could also add a commandline switch, LLVM_ENABLE_PRINT_COMMANDLINE_ARGS, or something like that so you only have to pay for it you want it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62353/new/

https://reviews.llvm.org/D62353





More information about the llvm-commits mailing list