Skip to content

Commit

Permalink
Reexport CMAKE_MODULE_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal committed Jan 14, 2024
1 parent 369f131 commit d24e4f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/CPM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit d24e4f2

Please sign in to comment.