This would fail the build with the error:

  CMake Error at tests/CMakeLists.txt:74 (string):
    string no output variable specified

* tests/CMakeLists.txt [CMAKE_BUILD_TYPE]: Make BUILD_TYPE variable
assignment conditional.

---

 tests/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index d50908cf..2d858a1d 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -71,7 +71,9 @@ else()
     set(PTHREAD_LIB pthread)
 endif()
 
-string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
+if(CMAKE_BUILD_TYPE)
+    string(TOUPPER ${CMAKE_BUILD_TYPE} ${BUILD_TYPE})
+endif()
 
 set(QML_TESTS_SOURCE_FILES
     ${CMAKE_SOURCE_DIR}/tests/qml/main.cpp

base-commit: a4300308dc8d03d59f620bb5fed753df5cf31ed9
-- 
2.41.0


Reply via email to