Skip to content

Commit fa55349

Browse files
committed
set default value in CMakeLists.txt
1 parent 618f9b1 commit fa55349

5 files changed

Lines changed: 20 additions & 7 deletions

File tree

tests/standalone/test-invoke-native/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ if (NOT DEFINED WAMR_BUILD_SIMD)
8888
set (WAMR_BUILD_SIMD 0)
8989
endif ()
9090

91+
if (NOT DEFINED WAMR_BUILD_REF_TYPES)
92+
# Enable reference types by default
93+
set (WAMR_BUILD_REF_TYPES 1)
94+
endif ()
95+
9196
set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
9297

9398
include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)

tests/standalone/test-module-malloc/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ endif ()
4848
if (NOT WAMR_BUILD_AOT)
4949
set (WAMR_BUILD_AOT 1)
5050
endif ()
51+
if (NOT WAMR_BUILD_REF_TYPES)
52+
set (WAMR_BUILD_REF_TYPES 1)
53+
endif ()
5154
set (WAMR_BUILD_LIBC_BUILTIN 1)
5255
set (WAMR_BUILD_LIBC_WASI 1)
5356

tests/standalone/test-module-malloc/run.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,27 @@ echo "============> test test-module-malloc"
2828

2929
if [[ $1 != "--aot" ]]; then
3030
rm -fr build && mkdir build && cd build
31-
cmake .. -DWAMR_BUILD_TARGET=${TARGET} -DWAMR_BUILD_REF_TYPES=1
31+
cmake .. -DWAMR_BUILD_TARGET=${TARGET}
3232
make -j > /dev/null 2>&1
3333
./iwasm --native-lib=./libtest_module_malloc.so wasm-app/test.wasm
3434
if [ ${TARGET} == "X86_64" ]; then
3535
echo "============> test test-module-malloc with hw bound check disabled"
3636
cd .. && rm -fr build && mkdir build && cd build
37-
cmake .. -DWAMR_BUILD_TARGET=${TARGET} -DWAMR_BUILD_REF_TYPES=1 -DWAMR_DISABLE_HW_BOUND_CHECK=1
37+
cmake .. -DWAMR_BUILD_TARGET=${TARGET} -DWAMR_DISABLE_HW_BOUND_CHECK=1
3838
make clean
3939
make -j > /dev/null 2>&1
4040
./iwasm --native-lib=./libtest_module_malloc.so wasm-app/test.wasm
4141
fi
4242
else
4343
rm -fr build && mkdir build && cd build
44-
cmake .. -DWAMR_BUILD_TARGET=${TARGET} -DWAMR_BUILD_REF_TYPES=1
44+
cmake .. -DWAMR_BUILD_TARGET=${TARGET}
4545
make -j > /dev/null 2>&1
4646
${WAMRC_CMD} ${WAMRC_FLAGS} -o wasm-app/test.aot wasm-app/test.wasm
4747
./iwasm --native-lib=./libtest_module_malloc.so wasm-app/test.aot
4848
if [ ${TARGET} == "X86_64" ]; then
4949
echo "============> test test-module-malloc with hw bound check disabled"
5050
cd .. && rm -fr build && mkdir build && cd build
51-
cmake .. -DWAMR_BUILD_TARGET=${TARGET} -DWAMR_BUILD_REF_TYPES=1 -DWAMR_DISABLE_HW_BOUND_CHECK=1
51+
cmake .. -DWAMR_BUILD_TARGET=${TARGET} -DWAMR_DISABLE_HW_BOUND_CHECK=1
5252
make clean
5353
make -j > /dev/null 2>&1
5454
${WAMRC_CMD} ${WAMRC_FLAGS} --bounds-checks=1 -o wasm-app/test.aot wasm-app/test.wasm

tests/standalone/test-pthread/threads-opcode-wasm-apps/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
cmake_minimum_required(VERSION 3.14)
55
project(wasm-apps)
66

7-
set(WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../../wamr)
7+
set(WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
88

99
if (APPLE)
1010
set (HAVE_FLAG_SEARCH_PATHS_FIRST 0)

tests/standalone/test-running-modes/c-embed/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
project(c_embed_test)
15-
1614
cmake_minimum_required(VERSION 3.14)
1715

16+
project(c_embed_test)
17+
1818
include(CheckPIESupported)
1919

2020
string (TOLOWER ${CMAKE_HOST_SYSTEM_NAME} WAMR_BUILD_PLATFORM)
@@ -34,6 +34,11 @@ set(WAMR_BUILD_LIBC_WASI 1)
3434
set(WAMR_BUILD_SIMD 1)
3535
set(WAMR_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../..)
3636

37+
if (NOT DEFINED WAMR_BUILD_REF_TYPES)
38+
# Enable reference types by default
39+
set (WAMR_BUILD_REF_TYPES 1)
40+
endif ()
41+
3742
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
3843
if (NOT WAMR_BUILD_PLATFORM STREQUAL "darwin")
3944
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -pie -fPIE")

0 commit comments

Comments
 (0)