summaryrefslogtreecommitdiff
path: root/compileoptions.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'compileoptions.cmake')
-rw-r--r--compileoptions.cmake10
1 files changed, 6 insertions, 4 deletions
diff --git a/compileoptions.cmake b/compileoptions.cmake
index 75d51fd..9f9f28e 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)
@@ -121,7 +123,7 @@ if (WIN32)
endif (WIN32)
-if(CMAKE_ENABLE_CODE_COVERAGE)
+if(CLR_CMAKE_ENABLE_CODE_COVERAGE)
if(CLR_CMAKE_PLATFORM_UNIX)
string(TOUPPER ${CMAKE_BUILD_TYPE} UPPERCASE_CMAKE_BUILD_TYPE)
@@ -138,4 +140,4 @@ if(CMAKE_ENABLE_CODE_COVERAGE)
message(FATAL_ERROR "Code coverage builds not supported on current platform")
endif(CLR_CMAKE_PLATFORM_UNIX)
-endif(CMAKE_ENABLE_CODE_COVERAGE)
+endif(CLR_CMAKE_ENABLE_CODE_COVERAGE)