Build: Change CMAKE_BUILD_TYPE to ignore case
Force CMAKE_BUILD_TYPE to be lowercase. Change all local cmake tests
that check it to lowercase.
Change-Id: I7465c22a86dcc7e5ff1802b43d1af74de5ba8b43
Signed-off-by: Raef Coles <raef.coles@arm.com>
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index 88bf8b3..0c9c764 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -24,6 +24,9 @@
#Configure the default build type
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (i.e. Debug)")
+#Ignore case on the cmake build types
+string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
+
if(CORE_IPC)
if (TFM_LVL EQUAL 3)
message(FATAL_ERROR "ERROR: Invalid isolation level!")
@@ -364,7 +367,7 @@
set(ATTEST_INCLUDE_OPTIONAL_CLAIMS ON)
endif()
-if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+if (CMAKE_BUILD_TYPE STREQUAL "debug")
set(ATTEST_INCLUDE_TEST_CODE_AND_KEY_ID ON)
else()
set(ATTEST_INCLUDE_TEST_CODE_AND_KEY_ID OFF)