Make the default build type "Debug" when compiling a git checkout.
ClosedPublic

Authored by dfaure on Jul 22 2019, 10:21 PM.

Details

Summary

The idea comes from
https://blog.kitware.com/cmake-and-the-default-build-type/
but I adapted it to leave it empty for tarballs, to avoid messing up
distribution packaging.

The goal is to make this more sensible for [new] developers who just
run cmake and end up with a "no debug symbols, no optimizations" build,
i.e. the one and only completely useless combination of those two flags.

Possible risk: distributions who compile from git checkouts...

Test Plan

"mkdir build ; cd build ; cmake .." in kblog leads to CMAKE_BUILD_TYPE=Debug

Diff Detail

Repository
R240 Extra CMake Modules
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14304
Build 14322: arc lint + arc unit
dfaure created this revision.Jul 22 2019, 10:21 PM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptJul 22 2019, 10:21 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
dfaure requested review of this revision.Jul 22 2019, 10:21 PM
apol added a subscriber: apol.Jul 22 2019, 10:24 PM

+1 Makes a lot of sense to me. In KDevelop we are already setting Debug by default.

krop accepted this revision.Jul 23 2019, 10:39 AM
krop added a subscriber: krop.

Good idea

This revision is now accepted and ready to land.Jul 23 2019, 10:39 AM
dfaure closed this revision.Jul 23 2019, 10:46 AM