Security.cmake 628 B

1234567891011121314151617181920212223
  1. function(enable_strict_warnings target)
  2. if (MSVC)
  3. #target_compile_options(${${${target}}} PRIVATE // Too complicated currently
  4. # /W3
  5. # /WX
  6. # /permissive-
  7. # /sdl
  8. #)
  9. else()
  10. target_compile_options(${${${target}}} PRIVATE
  11. -Wall
  12. -Wextra
  13. -Wpedantic
  14. -Werror
  15. -Wshadow
  16. -Wconversion
  17. -Wsign-conversion
  18. -Wnull-dereference
  19. -Wdouble-promotion
  20. -Wformat=2
  21. )
  22. endif()
  23. endfunction()