From f9e9d21a11cdbb7d79daefba10717de39edf9fd1 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 27 Aug 2021 11:43:04 +0200 Subject: CMake: Error out if ccache is requested but not found Before, we would just issue a warning which is likely to get overlooked in CMake's output. Also, the configure summary would report "Using ccache ... yes" but CMAKE__COMPILER_LAUNCHER stays unset, which is inconsistent. Make QT_USE_CCACHE=ON and missing ccache a hard error. Task-number: QTBUG-88308 Change-Id: Iddc7f3a91428fd96ad0defbb1ca72bd46a90aa98 Reviewed-by: Alexandru Croitor --- cmake/QtSetup.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake/QtSetup.cmake') diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake index 17357dc1a4..695245d66e 100644 --- a/cmake/QtSetup.cmake +++ b/cmake/QtSetup.cmake @@ -228,7 +228,7 @@ if(QT_USE_CCACHE) set(CMAKE_OBJC_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") set(CMAKE_OBJCXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") else() - message(WARNING "Ccache use was requested, but the program was not found.") + message(FATAL_ERROR "Ccache use was requested, but the program was not found.") endif() endif() -- cgit v1.2.3