diff options
Diffstat (limited to 'compileoptions.cmake')
-rw-r--r-- | compileoptions.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compileoptions.cmake b/compileoptions.cmake index 75d51fd5bb..718e9d34f1 100644 --- a/compileoptions.cmake +++ b/compileoptions.cmake @@ -23,8 +23,10 @@ if (CLR_CMAKE_PLATFORM_UNIX) # after hitting just about 20 errors. add_compile_options(-ferror-limit=4096) - # 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) # Disabled warnings add_compile_options(-Wno-unused-private-field) |