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
Member

Asserts historically only have been on in debug builds, however
running the tests in a debug configuration takes a while especially
if Cycles is enabled.

This adds WITH_ASSERT_RELEASE to enable asserts in release
configurations. It is enabled for "make developer" , and will also
be used for CI.

Asserts historically only have been on in debug builds, however running the tests in a debug configuration takes a while especially if Cycles is enabled. This adds WITH_ASSERT_RELEASE to enable asserts in release configurations. It is enabled for "make developer" , and will also be used for CI.
Ray molenkamp added 1 commit 2023-11-17 21:43:26 +01: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.
Ray molenkamp added 1 commit 2023-11-17 21:43:57 +01:00
buildbot/vexp-code-patch-coordinator Build done. Details
47334e029f
turn asserts on for testing on the bots.
Author
Member

@blender-bot build

@blender-bot build
Author
Member

@blender-bot build

@blender-bot build
Ray molenkamp added 2 commits 2023-11-18 21:18:24 +01:00
Ray molenkamp changed title from CMake: Allow asserts to be enabled for release builds. to WIP: CMake: Allow asserts to be enabled for release builds. 2023-11-21 16:22:51 +01:00

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.

In #115774 I try switching over everything to NDEBUG. To me it seems that either NDEBUG and DEBUG should be the exact opposite of each other, or only NDEBUG should exist.

> 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. In #115774 I try switching over everything to NDEBUG. To me it seems that either NDEBUG and DEBUG should be the exact opposite of each other, or only NDEBUG should exist.
Brecht Van Lommel added 2 commits 2023-12-06 16:13:02 +01:00
Brecht Van Lommel added 1 commit 2023-12-06 19:04:06 +01:00
buildbot/vexp-code-patch-linux-x86_64-lint Build done. Details
buildbot/vexp-code-patch-lint-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
a7f2cb148e
Turn off by default, enable for "make developer"
Brecht Van Lommel changed title from WIP: CMake: Allow asserts to be enabled for release builds. to CMake: Allow asserts to be enabled for release builds. 2023-12-06 19:07:12 +01:00
Brecht Van Lommel approved these changes 2023-12-06 19:09:28 +01:00
Brecht Van Lommel merged commit 44ac2e8a8d into main 2023-12-06 23:49:54 +01:00
Brecht Van Lommel deleted branch tmp_release_mode_asserts 2023-12-06 23:49:55 +01:00

Non-package builds now build with asserts on the buildbot.

Non-package builds now build with asserts on the buildbot.
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#115071
No description provided.