[CMake] Allow custom `CMAKE_BUILD_TYPE`s
authorIgor Zhukov <fsb4000@yandex.ru>
Tue, 7 Mar 2023 00:44:47 +0000 (07:44 +0700)
committerIgor Zhukov <fsb4000@yandex.ru>
Tue, 7 Mar 2023 00:48:38 +0000 (07:48 +0700)
Fixes #60975

Reviewed By: bogner

Differential Revision: https://reviews.llvm.org/D144835

llvm/CMakeLists.txt

index c993ff5..ba73eba 100644 (file)
@@ -388,7 +388,7 @@ 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}")
+  message(WARNING "Unknown value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
 endif()
 
 # LLVM_INSTALL_PACKAGE_DIR needs to be declared prior to adding the tools