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.
```
This commit is contained in:
YAMAMOTO Takashi 2022-10-27 12:27:34 +09:00 committed by GitHub
parent ef21f0c951
commit 15d645476a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")