Skip to content

Commit

Permalink
Accept arbitrary capitalization for coverage build type (#435)
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
(cherry picked from commit 916a917)
  • Loading branch information
azeey committed Jul 22, 2024
1 parent 986e65f commit 34c111c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/GzCodeCoverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 34c111c

Please sign in to comment.