CMake: Allow asserts to be enabled for release builds. #115071

Merged
Brecht Van Lommel merged 7 commits from LazyDodo/blender:tmp_release_mode_asserts into main 2023-12-06 23:49:54 +01:00

7 Commits

Author SHA1 Message Date
a7f2cb148e Turn off by default, enable for "make developer"
Some checks failed
buildbot/vexp-code-patch-linux-x86_64-lint Build done.
buildbot/vexp-code-patch-lint-linux-x86_64 Build done.
buildbot/vexp-code-patch-darwin-x86_64 Build done.
buildbot/vexp-code-patch-linux-x86_64 Build done.
buildbot/vexp-code-patch-windows-amd64 Build done.
buildbot/vexp-code-patch-lint Build done.
buildbot/vexp-code-patch-darwin-arm64 Build done.
buildbot/vexp-code-patch-coordinator Build done.
2023-12-06 17:37:09 +01:00
b2ef81542c Merge branch 'main' into HEAD
Some checks failed
buildbot/vexp-code-patch-linux-x86_64 Build done.
2023-12-06 16:11:15 +01:00
a527882e77 Rename to WITH_ASSERT_RELEASE, more comments 2023-12-06 16:10:52 +01:00
ce9d0e7524 fix cmake error with a fresh build folder
Some checks failed
buildbot/vexp-code-patch-coordinator Build done.
2023-11-18 13:17:53 -07:00
d83f31e43d Merge remote-tracking branch 'origin/main' into tmp_release_mode_asserts 2023-11-18 13:11:16 -07:00
47334e029f turn asserts on for testing on the bots.
Some checks failed
buildbot/vexp-code-patch-coordinator Build done.
2023-11-17 13:43:40 -07:00
1615a74f10 CMake: Allow asserts to be enabled for release builds.
Asserts historically only have been on in debug builds however
running the tests in a debug configuration "takes a bit" especially
if cycles is enabled.

This PR proposes compromise, release builds with asserts enabled.
Naturally we would never ship this to end users, but for devs and
the CI pipeline this could be useful.

Some minor cleanup needed to be done, since some code assumed `DEBUG`
and `NDEBUG` being guaranteed inverse of each other which no longer
holds true. Further clean-ups / additional asserts can be enabled
by looking for code guarded by an `ifdef #DEBUG` for now however I
set the bar at not adding additional warnings while building.
2023-11-17 13:41:11 -07:00