Index: llvm-project/llvm/CMakeLists.txt
===================================================================
--- a/llvm-project/llvm/CMakeLists.txt
+++ b/llvm-project/llvm/CMakeLists.txt
@@ -251,11 +251,6 @@ endif()
 
 string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
 
-if (CMAKE_BUILD_TYPE AND
-    NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
-  message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
-endif()
-
 set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
 
 set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
Index: xgl/CMakeLists.txt
===================================================================
--- a/xgl/CMakeLists.txt
+++ b/xgl/CMakeLists.txt
@@ -181,11 +181,6 @@ if (CMAKE_CONFIGURATION_TYPES)
 else()
     string(TOUPPER "${CMAKE_BUILD_TYPE}" capital_CMAKE_BUILD_TYPE)
 
-    if (CMAKE_BUILD_TYPE AND
-        NOT capital_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
-        message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
-    endif()
-
     if(capital_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
         set(CMAKE_BUILD_TYPE_DEBUG ON)
         set(CMAKE_BUILD_TYPE_RELEASE OFF)
--- a/xgl/cmake/Modules/AmdCmakeHelper.cmake	2021-04-07 06:57:17.000000000 +0200
+++ b/xgl/cmake/Modules/AmdCmakeHelper.cmake	2021-04-07 06:57:17.000000000 +0200
@@ -35,11 +35,6 @@
 else()
     string(TOUPPER "${CMAKE_BUILD_TYPE}" capital_CMAKE_BUILD_TYPE)
 
-    if (CMAKE_BUILD_TYPE AND
-        NOT capital_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
-        message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
-    endif()
-
     if(capital_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
         set(CMAKE_BUILD_TYPE_DEBUG ON)
         set(CMAKE_BUILD_TYPE_RELEASE OFF)
