From 338fbf6202dd0a91258808d1d8a7b0804e0b7db9 Mon Sep 17 00:00:00 2001 From: "Schaich, Alonso" Date: Sun, 20 Aug 2023 00:52:13 +0900 Subject: [PATCH] Remove warnings from the interface --- .../0004-remove-interface-warnings.patch | 73 +++++++++++++++++++ ports/tinyorm/portfile.cmake | 1 + 2 files changed, 74 insertions(+) create mode 100644 ports/tinyorm/0004-remove-interface-warnings.patch diff --git a/ports/tinyorm/0004-remove-interface-warnings.patch b/ports/tinyorm/0004-remove-interface-warnings.patch new file mode 100644 index 00000000000000..b9cc5cdeb866ac --- /dev/null +++ b/ports/tinyorm/0004-remove-interface-warnings.patch @@ -0,0 +1,73 @@ +diff --git a/cmake/CommonModules/TinyCommon.cmake b/cmake/CommonModules/TinyCommon.cmake +index fd2cfc8a..160cecaa 100644 +--- a/cmake/CommonModules/TinyCommon.cmake ++++ b/cmake/CommonModules/TinyCommon.cmake +@@ -91,7 +91,6 @@ ${TINY_UNPARSED_ARGUMENTS}") + /Zc:__cplusplus + # Standards-conforming behavior + /Zc:strictStrings +- /WX /W4 + $<$:/sdl> + ) + +@@ -102,7 +101,6 @@ ${TINY_UNPARSED_ARGUMENTS}") + /permissive- + # clang-cl 16 throws -Wunused-command-line-argument, so provide it + # only for the MSVC +- /guard:cf + /bigobj + # Standards-conforming behavior + /Zc:wchar_t,rvalueCast,inline +@@ -117,7 +115,6 @@ ${TINY_UNPARSED_ARGUMENTS}") + $<$>:/OPT:REF,ICF=5> + # /OPT:REF,ICF does not support incremental linking + $<$:/INCREMENTAL:NO> +- /WX + ) + endif() + +@@ -135,44 +132,6 @@ ${TINY_UNPARSED_ARGUMENTS}") + ) + endif() + +- if(NOT MSVC AND +- (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR +- CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR +- CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") +- ) +- target_compile_options(${target} INTERFACE +- # -fexceptions for linux is not needed, it is on by default +- -Wall +- -Wextra +- -Weffc++ +- -Werror +- -Wfatal-errors +- -Wcast-qual +- -Wcast-align +- -Woverloaded-virtual +- -Wold-style-cast +- -Wshadow +- -Wundef +- -Wfloat-equal +- -Wformat-security +- -Wdouble-promotion +- -Wconversion +- -Wzero-as-null-pointer-constant +- -Wuninitialized +- -pedantic +- -pedantic-errors +- # Reduce I/O operations +- -pipe +- ) +- +- # Clang 12 still doesn't support -Wstrict-null-sentinel +- include(CheckCXXCompilerFlag) +- check_cxx_compiler_flag(-Wstrict-null-sentinel SNS_SUPPORT) +- if(SNS_SUPPORT) +- target_compile_options(${target} INTERFACE -Wstrict-null-sentinel) +- endif() +- endif() +- + # Use faster lld linker on Clang (target the Clang except clang-cl with MSVC) + if(NOT MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + target_link_options(${target} INTERFACE -fuse-ld=lld) diff --git a/ports/tinyorm/portfile.cmake b/ports/tinyorm/portfile.cmake index 05241757315b76..6bd25142e90204 100644 --- a/ports/tinyorm/portfile.cmake +++ b/ports/tinyorm/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( 0001-install-tom.patch 0002-comment.patch 0003-reduce-assert-scopes.patch + 0004-remove-interface-warnings.patch ) vcpkg_check_features(