- # All warnings that are not explicitly disabled are reported as errors
- add_compile_options(-Werror)
+ if (CLR_CMAKE_WARNINGS_ARE_ERRORS)
+ # All warnings that are not explicitly disabled are reported as errors
+ add_compile_options(-Werror)
+ endif(CLR_CMAKE_WARNINGS_ARE_ERRORS)