Page MenuHomePhabricator

[CMAKE] Make RelWithDebInfo the default CMake configuration
Needs ReviewPublic

Authored by Fabien on Mon, Mar 4, 21:03.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Summary

This set RelWithDebInfo as the default build type for CMake. This
makes the default optimization flags identical to those from
configure.

Depends on D2651

Test Plan
mkdir buildcmake && cd buildcmake
cmake -GNinja ..
ninja -v

Check that the -g -O2 flags are set in the compile commands for both
CC and CXX compile lines.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cmake_default_RelDebWithInfo
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 5149
Build 8361: Bitcoin ABC Teamcity Staging
Build 8360: arc lint + arc unit

Event Timeline

Fabien created this revision.Mon, Mar 4, 21:03
Herald added a reviewer: Restricted Project. · View Herald TranscriptMon, Mar 4, 21:03
Herald added a subscriber: schancel. · View Herald Transcript
deadalnix requested changes to this revision.Mon, Mar 4, 21:15

This generates a ton of warning, so there is likely something not correct about what RelWithDebInfo does. It's not -O2 or -g though.

This revision now requires changes to proceed.Mon, Mar 4, 21:15
Fabien added a comment.Mon, Mar 4, 21:23

@deadalnix can you provide an example of what warning you are getting ?

Fabien updated this revision to Diff 7602.Tue, Mar 5, 16:46

Rebase

deadalnix requested changes to this revision.Tue, Mar 5, 20:51

Please do not change the config to something that's not working as expected. RelWithDebInfo is not working properly yet.

This revision now requires changes to proceed.Tue, Mar 5, 20:51
Fabien requested review of this revision.Wed, Mar 13, 14:56

Requesting review again since D2651 is landed.
This will add -g -O2 by default.