RFC: CPM_<dependency>_SOURCE precedence policy (explicit vs env)#695
RFC: CPM_<dependency>_SOURCE precedence policy (explicit vs env)#695CraigHutchinson wants to merge 5 commits intocpm-cmake:masterfrom
Conversation
|
Hey @CraigHutchinson thanks for opening this discussion and the related code change! I see the inconsistency in the way Given that's it's expected to be used in development setups only, how about we emit a warning whenever |
|
Thanks, it's been a bug bear in using cpm for me for a long time and realising it was just an inconsistency was a revelation! I really love the idea of emitting the message if it helps move things forwards for consistency and will see about getting a chance to update this week. The other (somewhat dirty) idea was having a global config flag somehwere (use/don't use env first) - so you could project wide disable use of env/dev sources etc. I think this could be something very separate though on an as needed basis as not sure if it's ever really an issue for any real work flow and atm feels overengineered! As another as side, I did try and check to see if there are other consustency/method consistency architecture decisions that could be made to ensure the cpm 'api' remains relevant across use cases - not spotted any so far. |
Decision requested first
Choose one policy direction for future consistency, specifically around
CPM_<dependency>_SOURCE:explicit -> env -> default) where applicable.Specifically related to the gap #406 and the rebased #696 intend to address.
Why this matters
CPM_<dependency>_SOURCEis currently explicit-only and is the main outlier compared with adjacentCPM_*controls.-D...arguments.Master inventory table (current runtime
CPM_*controls)CPM_USE_LOCAL_PACKAGESCPM_LOCAL_PACKAGES_ONLYCPM_DOWNLOAD_ALLCPM_DONT_UPDATE_MODULE_PATHCPM_DONT_CREATE_PACKAGE_LOCKCPM_INCLUDE_ALL_IN_PACKAGE_LOCKCPM_USE_NAMED_CACHE_DIRECTORIESCPM_SOURCE_CACHE(main CPM)CPM_SOURCE_CACHE(get_cpm.cmake)CPM_DOWNLOAD_<name>CPM_<dependency>_SOURCEInventory result
CPM_*env usage on current master found no env-only controls.CPM_<dependency>_SOURCEbeing explicit-only while adjacent controls already support explicit+env patterns.Scope
Points of interest (for quick discussion)
CPM_<dependency name>_SOURCElocal package override from ENV #406