Skip to content

Commit f1e34d3

Browse files
committed
fix: ensure proper definition checks for build options in CMakeLists of wasm-mutator
1 parent b94a92f commit f1e34d3

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

build-scripts/unsupported_combination.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ endfunction()
6161
# Below are the unsupported combinations checks
6262
# Please keep this list in sync with tests/unit/unsupported-features/CMakeLists.txt
6363
# and tests/wamr-test-suites/test_wamr.sh
64-
cmake_print_variables(WAMR_BUILD_INTERP WAMR_BUILD_FAST_INTERP WAMR_BUILD_JIT WAMR_BUILD_EXCE_HANDLING)
6564

6665
if(WAMR_BUILD_EXCE_HANDLING EQUAL 1)
6766
check_aot_mode_error("Unsupported build configuration: EXCE_HANDLING + AOT")

tests/fuzz/wasm-mutator-fuzz/wasm-mutator/CMakeLists.txt

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,46 @@ if(CUSTOM_MUTATOR EQUAL 1)
66
endif()
77

88
# Set default build options with the ability to override from the command line
9-
if(NOT WAMR_BUILD_INTERP)
9+
if(NOT DEFINED WAMR_BUILD_INTERP)
1010
set(WAMR_BUILD_INTERP 1)
1111
endif()
1212

13-
if(NOT WAMR_BUILD_AOT)
13+
if(NOT DEFINED WAMR_BUILD_AOT)
1414
set(WAMR_BUILD_AOT 1)
1515
endif()
1616

17-
if(NOT WAMR_BUILD_JIT)
17+
if(NOT DEFINED WAMR_BUILD_JIT)
1818
set(WAMR_BUILD_JIT 0)
1919
endif()
2020

21-
if(NOT WAMR_BUILD_LIBC_BUILTIN)
21+
if(NOT DEFINED WAMR_BUILD_LIBC_BUILTIN)
2222
set(WAMR_BUILD_LIBC_BUILTIN 0)
2323
endif()
2424

25-
if(NOT WAMR_BUILD_LIBC_WASI)
25+
if(NOT DEFINED WAMR_BUILD_LIBC_WASI)
2626
set(WAMR_BUILD_LIBC_WASI 1)
2727
endif()
2828

29-
if(NOT WAMR_BUILD_FAST_INTERP)
29+
if(NOT DEFINED WAMR_BUILD_FAST_INTERP)
3030
set(WAMR_BUILD_FAST_INTERP 1)
3131
endif()
3232

33-
if(NOT WAMR_BUILD_MULTI_MODULE)
33+
if(NOT DEFINED WAMR_BUILD_MULTI_MODULE)
3434
set(WAMR_BUILD_MULTI_MODULE 0)
3535
endif()
3636

37-
if(NOT WAMR_BUILD_LIB_PTHREAD)
37+
if(NOT DEFINED WAMR_BUILD_LIB_PTHREAD)
3838
set(WAMR_BUILD_LIB_PTHREAD 0)
3939
endif()
4040

41-
if(NOT WAMR_BUILD_MINI_LOADER)
41+
if(NOT DEFINED WAMR_BUILD_MINI_LOADER)
4242
set(WAMR_BUILD_MINI_LOADER 0)
4343
endif()
4444

45-
set(WAMR_BUILD_SIMD 1)
45+
if(NOT DEFINED WAMR_BUILD_SIMD)
46+
set(WAMR_BUILD_SIMD 1)
47+
endif()
48+
4649
set(WAMR_BUILD_REF_TYPES 1)
4750
set(WAMR_BUILD_GC 1)
4851

0 commit comments

Comments
 (0)