CMake: Implement configure -force-asserts

Change-Id: Ife15b8d008c5b3f5eed61ec3bc048fda4c4b4e46
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2020-08-24 10:39:49 +02:00
parent b0e4545a4b
commit de751066d6
2 changed files with 5 additions and 1 deletions

View File

@ -194,6 +194,10 @@ if (GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "9.2")
target_compile_options(PlatformCommonInternal INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-Wsuggest-override>)
endif()
if(QT_FEATURE_force_asserts)
target_compile_definitions(PlatformCommonInternal INTERFACE QT_FORCE_ASSERTS)
endif()
if(DEFINED QT_EXTRA_DEFINES)
target_compile_definitions(PlatformCommonInternal INTERFACE ${QT_EXTRA_DEFINES})
endif()

View File

@ -35,7 +35,7 @@ The effort of this is tracked in QTBUG-85373 and QTBUG-85349.
| -gdb-index | -DFEATURE_enable_gdb_index=ON | |
| -strip | | |
| -gc-binaries | -DFEATURE_gc_binaries=ON | |
| -force-asserts | | |
| -force-asserts | -DFEATURE_force_asserts=ON | |
| -developer-build | -DFEATURE_developer_build=ON | |
| -shared | -DBUILD_SHARED_LIBS=ON | |
| -static | -DBUILD_SHARED_LIBS=OFF | |