#14654 Fix Linux Release build defining NO_DEBUG instead of NDEBUG - #14744
Open
magnesj wants to merge 3 commits into
Open
#14654 Fix Linux Release build defining NO_DEBUG instead of NDEBUG#14744magnesj wants to merge 3 commits into
magnesj wants to merge 3 commits into
Conversation
magnesj
force-pushed
the
14654-fix-linux-release-ndebug
branch
from
September 13, 2026 05:53
0852685 to
5d00a0b
Compare
CMAKE_CXX_FLAGS_RELEASE was overwritten with -DNO_DEBUG on Linux in both CMakeLists.txt and Fwk/CMakeLists.txt. NO_DEBUG is not a standard macro, so NDEBUG was never defined in Linux Release builds. As a result, cafAssert.h fell back to CAF_ENABLE_ASSERTS 1, keeping CAF_ASSERT (and standard assert()) active in Release and aborting the app, even though RESINSIGHT_ENABLE_ASSERTS_IN_RELEASE defaults to OFF. Windows and macOS Release builds were unaffected. Drop the override entirely so CMake supplies its default Release flags (-O3 -DNDEBUG) on Linux, matching Windows and macOS. Also simplify CEE_USE_QT5/CEE_USE_QT6 handling: set them directly instead of via option() with malformed NOT DEFINED(...) guards.
magnesj
force-pushed
the
14654-fix-linux-release-ndebug
branch
from
September 13, 2026 05:54
5d00a0b to
e2953dd
Compare
…elease build failure Default-initialize the double members of VfpValueSelection to 0.0. computeValueSelectionCombinations() in RimCustomVfpPlot.cpp only sets the fields corresponding to non-family production variables, leaving the family variable's field unset. With -O3 now enabled on Linux Release builds (after removing the NO_DEBUG/NDEBUG flag override), GCC's -Werror=maybe-uninitialized flags this as an error.
…export WellPathCellIntersectionInfo has no default member initializers, and filterIntersections() only assigned intersectedCellFaceOut inside the if/else-if pair. When both faces of the first intersection are NO_FACE, the member was copied into the result vector while indeterminate. GCC detects this at -O3 and the Linux Release build failed with -Werror=maybe-uninitialized.
magnesj
force-pushed
the
14654-fix-linux-release-ndebug
branch
from
September 13, 2026 18:18
6b382a4 to
1016b9b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14654
CMAKE_CXX_FLAGS_RELEASEwas overwritten with-O2 -DNO_DEBUGon Linux in bothCMakeLists.txtandFwk/CMakeLists.txt.NO_DEBUGis not a standard macro, soNDEBUGwas never defined in Linux Release builds.As a result,
cafAssert.hfell back toCAF_ENABLE_ASSERTS 1, keepingCAF_ASSERT(and standardassert()) active in Release, aborting the app even thoughRESINSIGHT_ENABLE_ASSERTS_IN_RELEASEdefaults to OFF. Windows and macOS Release builds were unaffected.Dropped the override entirely, so CMake supplies its default Release flags (
-O3 -DNDEBUG) on Linux, matching Windows and macOS.Note: this may surface a separate, currently-masked issue with a failing
CAF_ASSERTinAppEnumMapperBase::addItem(AppEnum alias duplication), which should be diagnosed separately, per the issue notes.