From 5b95ec1e65e2782aa1e752148165a41933e9497b Mon Sep 17 00:00:00 2001 From: Bambooin Date: Tue, 22 Aug 2023 10:43:41 +0800 Subject: [PATCH] chore: increase compiler warning --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a4117aed61..9d24cc3a9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,14 @@ add_definitions(-DRIME_VERSION="${rime_version}") include(GNUInstallDirs) +if (MSVC) + # warning level 4 + add_compile_options(/W4) +else() + # additional warnings + add_compile_options(-Wall -Wextra -Wpedantic) +endif() + option(BUILD_SHARED_LIBS "Build Rime as shared library" ON) option(BUILD_MERGED_PLUGINS "Merge plugins into one Rime library" ON) option(BUILD_STATIC "Build with dependencies as static libraries" OFF)