fix-compile-options.patch 622 B

123456789101112131415161718
  1. diff --git a/CMakeLists.txt b/CMakeLists.txt
  2. index c83dd83..2d1a7e6 100644
  3. --- a/CMakeLists.txt
  4. +++ b/CMakeLists.txt
  5. @@ -82,9 +82,11 @@ if(HAVE_WERROR_FLAG)
  6. option(ENABLE_WERROR "Enable -Werror in all Makefiles" OFF)
  7. endif()
  8. +if(MSVC AND NOT WITH_ASM)
  9. + add_compile_options(/wd4267 /wd4996)
  10. +endif()
  11. +
  12. add_compile_options(
  13. - $<$<BOOL:${MSVC}>:/wd4267>
  14. - $<$<BOOL:${MSVC}>:/wd4996>
  15. $<$<BOOL:${ENABLE_WERROR}>:-Werror>
  16. $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:${HAVE_WEFFCXX_FLAG}>>:-Weffc++>
  17. $<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:${HAVE_DECL_AFTER_STMT_FLAG}>>:-Wdeclaration-after-statement>)