From f44d08e206d7ea81e6ffe26a8b5d7bea1545d7c7 Mon Sep 17 00:00:00 2001 From: Tom Rondeau <tom@trondeau.com> Date: Thu, 24 Jul 2014 13:06:33 -0400 Subject: cmake: make build type check insensitive to case --- cmake/Modules/GrBuildTypes.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cmake/Modules') diff --git a/cmake/Modules/GrBuildTypes.cmake b/cmake/Modules/GrBuildTypes.cmake index aa59d0089f..8d6f08b7af 100644 --- a/cmake/Modules/GrBuildTypes.cmake +++ b/cmake/Modules/GrBuildTypes.cmake @@ -53,10 +53,12 @@ list(APPEND AVAIL_BUILDTYPES # the avialable build types. ######################################################################## function(GR_CHECK_BUILD_TYPE settype) + STRING(TOUPPER ${settype} _settype) foreach(btype ${AVAIL_BUILDTYPES}) - if(${settype} STREQUAL ${btype}) + STRING(TOUPPER ${btype} _btype) + if(${_settype} STREQUAL ${_btype}) return() # found it; exit cleanly - endif(${settype} STREQUAL ${btype}) + endif(${_settype} STREQUAL ${_btype}) endforeach(btype) # Build type not found; error out message(FATAL_ERROR "Build type '${settype}' not valid, must be one of: ${AVAIL_BUILDTYPES}") -- cgit v1.2.3