Keep fix the CMake compatibility issue (#4180)
``` CMake Error at CMakeLists.txt:4 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. ```
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
cmake_minimum_required (VERSION 3.14)
|
||||
|
||||
if (NOT DEFINED CMAKE_C_COMPILER)
|
||||
set (CMAKE_C_COMPILER "clang")
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
cmake_minimum_required (VERSION 3.14)
|
||||
|
||||
project(wasm_mutator)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(wasm-app)
|
||||
|
||||
set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
|
||||
|
||||
@ -1,10 +1,17 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(unit-test)
|
||||
|
||||
# Yes. To solve the compatibility issue with CMAKE (>= 4.0), we need to update
|
||||
# our `cmake_minimum_required()` to 3.5. However, there are CMakeLists.txt
|
||||
# from 3rd parties that we should not alter. Therefore, in addition to
|
||||
# changing the `cmake_minimum_required()`, we should also add a configuration
|
||||
# here that is compatible with earlier versions.
|
||||
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
|
||||
|
||||
SET(CMAKE_BUILD_TYPE Debug)
|
||||
|
||||
# add_definitions (-m32)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project (test-aot-stack-frame)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(wasm-apps-aot-stack-frame)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project (test-aot)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project (test-compilation)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project (test-custom-section)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(wasm-apps-custom-section)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project (test-wamr-gc)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project (test-interpreter)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project (test-libc-builtin)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project (test-linear-memory-aot)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project (test-linear-memory-wasm)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(test-runtime-common)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project (test-shared-utils)
|
||||
|
||||
|
||||
@ -1,6 +1,13 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
# Yes. To solve the compatibility issue with CMAKE (>= 4.0), we need to update
|
||||
# our `cmake_minimum_required()` to 3.5. However, there are CMakeLists.txt
|
||||
# from 3rd parties that we should not alter. Therefore, in addition to
|
||||
# changing the `cmake_minimum_required()`, we should also add a configuration
|
||||
# here that is compatible with earlier versions.
|
||||
set(CMAKE_POLICY_VERSION_MINIMUM 3.5 FORCE)
|
||||
|
||||
if (NOT DEFINED WAMR_BUILD_PLATFORM)
|
||||
set (WAMR_BUILD_PLATFORM "linux")
|
||||
endif ()
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required (VERSION 2.9)
|
||||
cmake_minimum_required (VERSION 3.14)
|
||||
project (wasm_c_api_test)
|
||||
|
||||
################ runtime settings ################
|
||||
@ -34,6 +34,14 @@ add_library(vmlib STATIC ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
################################################
|
||||
|
||||
################ unit test related ################
|
||||
|
||||
# Yes. To solve the compatibility issue with CMAKE (>= 4.0), we need to update
|
||||
# our `cmake_minimum_required()` to 3.5. However, there are CMakeLists.txt
|
||||
# from 3rd parties that we should not alter. Therefore, in addition to
|
||||
# changing the `cmake_minimum_required()`, we should also add a configuration
|
||||
# here that is compatible with earlier versions.
|
||||
set(CMAKE_POLICY_VERSION_MINIMUM 3.5 FORCE)
|
||||
|
||||
# Add googletest directly to our build. This defines
|
||||
# the gtest and gtest_main targets.
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
cmake_minimum_required(VERSION 2.9)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project (test-wasm-vm)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user