Skip to content

ecm_add_test: add -DQT_FORCE_ASSERTS to compile flags by default

While debugging a failing test (KProcessTest in KCoreAddons), I noticed that the Q_ASSERT() statements inside that test weren't being executed because RelWithDebInfo builds default to passing -DQT_NO_DEBUG. I believe having assertions enabled in tests makes sense even for release builds but it's still possible to opt out of this new behaviour by passing DISABLE_QT_FORCE_ASSERTS to ecm_add_tests(). With this change the test I was debugging now asserts early instead of failing a QCOMPARE later on.

Merge request reports