[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] build: Guard against potential unset CMAKE_BUILD_TYPE.
From: |
Maxim Cournoyer |
Subject: |
[PATCH] build: Guard against potential unset CMAKE_BUILD_TYPE. |
Date: |
Mon, 8 Jan 2024 00:04:12 -0500 |
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
- [PATCH] build: Guard against potential unset CMAKE_BUILD_TYPE.,
Maxim Cournoyer <=