diff --git a/cmake/GzCodeCoverage.cmake b/cmake/GzCodeCoverage.cmake index 85e6bdd9..f3142947 100644 --- a/cmake/GzCodeCoverage.cmake +++ b/cmake/GzCodeCoverage.cmake @@ -56,7 +56,9 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX) ENDIF() ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX -IF ( NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "Coverage")) +# Convert to uppercase in order to support arbitrary capitalization +string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPERCASE) +IF ( NOT (CMAKE_BUILD_TYPE_UPPERCASE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE_UPPERCASE STREQUAL "COVERAGE")) MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" ) ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"