MACRO(ENABLE_WARNINGS flag)
	IF(ENABLE_WERROR)
		ADD_C_FLAG_IF_SUPPORTED(-Werror=${flag})
	ELSE()
		ADD_C_FLAG_IF_SUPPORTED(-W${flag})
	ENDIF()
ENDMACRO()

MACRO(DISABLE_WARNINGS flag)
	ADD_C_FLAG_IF_SUPPORTED(-Wno-${flag})
	IF(ENABLE_WERROR)
		ADD_C_FLAG_IF_SUPPORTED(-Wno-error=${flag})
	ENDIF()
ENDMACRO()