From ef6beae05766bc439c75a53e8b22c800f4f08bec Mon Sep 17 00:00:00 2001 From: disinvite Date: Tue, 16 Jul 2024 15:33:01 -0400 Subject: [PATCH] Option to disable decomp asserts in MSVC --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ed6f3a6..a775dc2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,7 @@ option(ISLE_BUILD_APP "Build ISLE.EXE application" ON) cmake_dependent_option(ISLE_BUILD_CONFIG "Build CONFIG.EXE application" ON "NOT MINGW" OFF) option(ISLE_USE_SMARTHEAP "Build with SmartHeap" ${MSVC_FOR_DECOMP}) option(ISLE_USE_DX5 "Build with internal DirectX 5 SDK" ON) +option(ISLE_DECOMP_ASSERT "Assert struct size" ${MSVC_FOR_DECOMP}) cmake_dependent_option(ISLE_USE_DX5_LIBS "Build with internal DirectX 5 SDK Libraries" ON ISLE_USE_DX5 OFF) add_cxx_warning(parentheses) @@ -512,7 +513,8 @@ if (MSVC) endif() endif() -if (MSVC_FOR_DECOMP) +if (ISLE_DECOMP_ASSERT) + message(STATUS "Decomp asserts enabled") foreach(tgt IN LISTS lego1_targets) target_compile_definitions(${tgt} PRIVATE "ENABLE_DECOMP_ASSERTS") endforeach()