
if("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC")
  # TODO: someone needs to provide the msvc equivalent warning flags
  macro(dispatch_common_warnings)
  endmacro()
else()
  macro(dispatch_common_warnings)
	add_compile_options(-Werror)
	add_compile_options(-Wall)
	add_compile_options(-Wextra)
	add_compile_options(-Wno-unknown-warning-option)
	add_compile_options(-Wno-trigraphs)
	add_compile_options(-Wmissing-field-initializers)
	add_compile_options(-Wmissing-prototypes)
	add_compile_options(-Wdocumentation)
	add_compile_options(-Wunreachable-code)
	add_compile_options(-Wmissing-braces)
	add_compile_options(-Wparentheses)
	add_compile_options(-Wswitch)
	add_compile_options(-Wunused-function)
	add_compile_options(-Wunused-label)
	add_compile_options(-Wunused-parameter)
	add_compile_options(-Wunused-variable)
	add_compile_options(-Wunused-value)
	add_compile_options(-Wempty-body)
	add_compile_options(-Wuninitialized)
	add_compile_options(-Wunknown-pragmas)
	add_compile_options(-Wshadow)
	add_compile_options(-Wno-four-char-constants)
	add_compile_options(-Wconversion)
	add_compile_options(-Wconstant-conversion)
	add_compile_options(-Wint-conversion)
	add_compile_options(-Wbool-conversion)
	add_compile_options(-Wenum-conversion)
	add_compile_options(-Wassign-enum)
	add_compile_options(-Wsign-compare)
	add_compile_options(-Wshorten-64-to-32)
	add_compile_options(-Wpointer-sign)
	add_compile_options(-Wnewline-eof)
	add_compile_options(-Wdeprecated-declarations)
	add_compile_options(-Wsign-conversion)
	add_compile_options(-Winfinite-recursion)
	add_compile_options(-Warray-bounds-pointer-arithmetic)
	add_compile_options(-Watomic-properties)
	add_compile_options(-Wcomma)
	add_compile_options(-Wconditional-uninitialized)
	add_compile_options(-Wcovered-switch-default)
	add_compile_options(-Wdate-time)
	add_compile_options(-Wdeprecated)
	add_compile_options(-Wdouble-promotion)
	add_compile_options(-Wduplicate-enum)
	add_compile_options(-Wexpansion-to-defined)
	add_compile_options(-Wfloat-equal)
	add_compile_options(-Widiomatic-parentheses)
	add_compile_options(-Wignored-qualifiers)
	add_compile_options(-Wimplicit-fallthrough)
	add_compile_options(-Wnullable-to-nonnull-conversion)
	add_compile_options(-Wobjc-interface-ivars)
	add_compile_options(-Wover-aligned)
	add_compile_options(-Wpacked)
	add_compile_options(-Wpointer-arith)
	add_compile_options(-Wselector)
	add_compile_options(-Wstatic-in-inline)
	add_compile_options(-Wsuper-class-method-mismatch)
	add_compile_options(-Wswitch-enum)
	add_compile_options(-Wtautological-compare)
	add_compile_options(-Wunguarded-availability)
	add_compile_options(-Wunused)
	add_compile_options(-Wno-disabled-macro-expansion)
	add_compile_options(-Wno-pedantic)
	add_compile_options(-Wno-bad-function-cast)
	add_compile_options(-Wno-c++-compat)
	add_compile_options(-Wno-c++98-compat)
	add_compile_options(-Wno-c++98-compat-pedantic)
	add_compile_options(-Wno-cast-align)
	add_compile_options(-Wno-cast-qual)
	add_compile_options(-Wno-documentation-unknown-command)
	add_compile_options(-Wno-format-nonliteral)
	add_compile_options(-Wno-missing-variable-declarations)
	add_compile_options(-Wno-old-style-cast)
	add_compile_options(-Wno-padded)
	add_compile_options(-Wno-reserved-id-macro)
	add_compile_options(-Wno-shift-sign-overflow)
	add_compile_options(-Wno-undef)
	add_compile_options(-Wno-unreachable-code-aggressive)
	add_compile_options(-Wno-unused-macros)
	add_compile_options(-Wno-used-but-marked-unused)
	add_compile_options(-Wno-vla)
  endmacro()
endif()
