[llvm] [CMake] Provide more useful message for check_symbol_exists failures (PR #104709)
Kagami Sascha Rosylight via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 18 07:15:15 PDT 2024
https://github.com/saschanaz updated https://github.com/llvm/llvm-project/pull/104709
>From 6404173997a12c2122a2b05d16fa1252d54deef4 Mon Sep 17 00:00:00 2001
From: Kagami Sascha Rosylight <saschanaz at outlook.com>
Date: Sun, 18 Aug 2024 16:08:35 +0200
Subject: [PATCH] [CMake] Provide more useful message for check_symbol_exists
failures
---
llvm/cmake/config-ix.cmake | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
index 0aae13e30f2ab4..f2ccbf906729b5 100644
--- a/llvm/cmake/config-ix.cmake
+++ b/llvm/cmake/config-ix.cmake
@@ -141,7 +141,7 @@ if(LLVM_ENABLE_ZLIB)
check_symbol_exists(compress2 zlib.h HAVE_ZLIB)
cmake_pop_check_state()
if(LLVM_ENABLE_ZLIB STREQUAL FORCE_ON AND NOT HAVE_ZLIB)
- message(FATAL_ERROR "Failed to configure zlib")
+ message(FATAL_ERROR "Found an unusable zlib, check whether it matches the compile target")
endif()
endif()
set(LLVM_ENABLE_ZLIB "${HAVE_ZLIB}")
@@ -178,7 +178,7 @@ if(LLVM_ENABLE_LIBXML2)
check_symbol_exists(xmlReadMemory libxml/xmlreader.h HAVE_LIBXML2)
cmake_pop_check_state()
if(LLVM_ENABLE_LIBXML2 STREQUAL FORCE_ON AND NOT HAVE_LIBXML2)
- message(FATAL_ERROR "Failed to configure libxml2")
+ message(FATAL_ERROR "Found an unusable libxml2, check whether it matches the compile target")
endif()
endif()
set(LLVM_ENABLE_LIBXML2 "${HAVE_LIBXML2}")
@@ -198,7 +198,7 @@ if(LLVM_ENABLE_CURL)
check_symbol_exists(curl_easy_init curl/curl.h HAVE_CURL)
cmake_pop_check_state()
if(LLVM_ENABLE_CURL STREQUAL FORCE_ON AND NOT HAVE_CURL)
- message(FATAL_ERROR "Failed to configure curl")
+ message(FATAL_ERROR "Found an unusable curl, check whether it matches the compile target")
endif()
endif()
set(LLVM_ENABLE_CURL "${HAVE_CURL}")
@@ -218,7 +218,7 @@ if(LLVM_ENABLE_HTTPLIB)
check_cxx_symbol_exists(CPPHTTPLIB_HTTPLIB_H ${HTTPLIB_HEADER_PATH} HAVE_HTTPLIB)
cmake_pop_check_state()
if(LLVM_ENABLE_HTTPLIB STREQUAL FORCE_ON AND NOT HAVE_HTTPLIB)
- message(FATAL_ERROR "Failed to configure cpp-httplib")
+ message(FATAL_ERROR "Found an unusable cpp-httplib, check whether it matches the compile target")
endif()
endif()
set(LLVM_ENABLE_HTTPLIB "${HAVE_HTTPLIB}")
More information about the llvm-commits
mailing list