new module ECMSourceVersionControl
ClosedPublic

Authored by sitter on Sep 23 2019, 2:02 PM.

Details

Summary

simply sets a variable when the source is under version control. use it to
auto-enable Debug builds. there are also plans to switch special assertion
logic on in KIO when used from git, so there definitely is a more generic
use case of wanting to control behavior based on whether it the source is
likely used to make a development or production build.

conceivably the module could be used in the future to get git rev-parse or
the like, hence the generic name.

Test Plan

with .git the var is true, without it is false

Diff Detail

Repository
R240 Extra CMake Modules
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Sep 23 2019, 2:02 PM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptSep 23 2019, 2:02 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
sitter requested review of this revision.Sep 23 2019, 2:02 PM
dfaure accepted this revision.Sep 23 2019, 2:05 PM
This revision is now accepted and ready to land.Sep 23 2019, 2:05 PM
kossebau added a subscriber: kossebau.EditedSep 23 2019, 2:24 PM

Should the new module be part of public ECM macros? Then it misses a documentation linking file docs/module/ECMSourceVersionControl.rst

Would be also good to have this variable being set mentioned in [the docs of] KDECompilerSettings, unless this is also not under public API promise ?

Should the new module be part of public ECM macros? Then it misses a documentation linking file docs/module/ECMSourceVersionControl.rst

I am blind, ignore me.

This revision was automatically updated to reflect the committed changes.