From d24e4f267cbab47ca9efca6f21f2c376bff21353 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Sun, 14 Jan 2024 18:25:33 +0700 Subject: [PATCH] Reexport `CMAKE_MODULE_PATH` --- cmake/CPM.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/CPM.cmake b/cmake/CPM.cmake index f4d0eea4..ca8c3302 100644 --- a/cmake/CPM.cmake +++ b/cmake/CPM.cmake @@ -756,6 +756,7 @@ function(CPMAddPackage) "${CPM_ARGS_SYSTEM}" "${CPM_ARGS_OPTIONS}" ) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE) set(PACKAGE_INFO "${PACKAGE_INFO} at ${download_directory}") # As the source dir is already cached/populated, we override the call to FetchContent. @@ -815,6 +816,7 @@ function(CPMAddPackage) "${CPM_ARGS_SYSTEM}" "${CPM_ARGS_OPTIONS}" ) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE) endif() cpm_get_fetch_properties("${CPM_ARGS_NAME}") endif() @@ -986,6 +988,7 @@ function( set(CPM_OLD_INDENT "${CPM_INDENT}") set(CPM_INDENT "${CPM_INDENT} ${PACKAGE}:") add_subdirectory(${SOURCE_DIR} ${BINARY_DIR} ${addSubdirectoryExtraArgs}) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE) set(CPM_INDENT "${CPM_OLD_INDENT}") endif() endfunction()