From 4839029645bae1ff7f17e0f1c7543bc3eb30f471 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 23 Jun 2026 20:18:26 +0200 Subject: [PATCH] cmake: robustify base path in local file reference To make the macro find this file also when used elsewhere than the root `CMakeLists.txt`. Current code only uses it from the root. Follow-up to 88c17d5587447b367c7ec836ff9b847860f52f75 Closes #22187 --- CMake/Macros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMake/Macros.cmake b/CMake/Macros.cmake index 953c1c6ee6..40968156d2 100644 --- a/CMake/Macros.cmake +++ b/CMake/Macros.cmake @@ -43,7 +43,7 @@ macro(curl_internal_test _curl_test) message(STATUS "Performing Test ${_curl_test}") try_compile(${_curl_test} ${PROJECT_BINARY_DIR} - "${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c" + "${PROJECT_SOURCE_DIR}/CMake/CurlTests.c" COMPILE_DEFINITIONS "-D${_curl_test}" ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS} ${CMAKE_REQUIRED_DEFINITIONS} LINK_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}" OUTPUT_VARIABLE CURL_TEST_OUTPUT)