cmake: respect MAX_CUSTOM_OPT_LEVEL if set

- ignored for Debug and Coverage builds
This commit is contained in:
Daniel Agar
2020-10-26 11:55:55 -04:00
parent 5ea8824439
commit 961b545da0
+6
View File
@@ -146,6 +146,12 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
endif()
if(NOT (${CMAKE_BUILD_TYPE} MATCHES "Coverage") AND NOT (${CMAKE_BUILD_TYPE} MATCHES "Debug"))
if(MAX_CUSTOM_OPT_LEVEL)
add_compile_options(${MAX_CUSTOM_OPT_LEVEL})
endif()
endif()
# santiziers (ASAN)
if(ECL_ASAN)
message(STATUS "ecl address sanitizer enabled ")