From 15d645476ac5c95680c4d80924afd38aa3ffc6dd Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 27 Oct 2022 12:27:34 +0900 Subject: [PATCH] Update the top level CMakeLists.txt a bit (#1642) Disable -Wunused-parameter in the top level CMakeLists.txt as this repo has tons of it. Note: We have this particular warning disabled in build-scripts/runtime_lib.cmake too. Bump minimum cmake version for the top level CMakeLists.txt to fix the following warning on macOS. ``` CMake Warning (dev): Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake --help-policy CMP0042" for policy details. Use the cmake_policy command to set the policy and suppress this warning. MACOSX_RPATH is not specified for the following targets: iwasm_shared This warning is for project developers. Use -Wno-dev to suppress it. ``` --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 14a77def..9ca63d7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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.0) project (iwasm) @@ -107,7 +107,7 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake) -set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wshadow") +set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wshadow -Wno-unused-parameter") # set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wsign-conversion") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wno-unused")