-
Notifications
You must be signed in to change notification settings - Fork 980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove deprecated uses of FetchContent_Populate #2169
base: develop
Are you sure you want to change the base?
Conversation
Cannot use MakeAvailable as the files shouldn't be added to the build, so instead uses the full signature for FetchContent_Populate Fixes raspberrypi#2124
@@ -40,25 +40,26 @@ if (NOT PICO_SDK_PATH) | |||
if (PICO_SDK_FETCH_FROM_GIT_PATH) | |||
get_filename_component(FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}") | |||
endif () | |||
# GIT_SUBMODULES_RECURSE was added in 3.17 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the new version of the code still need to do something different if we're using an older version of CMake which doesn't support GIT_SUBMODULES_RECURSE
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will fix that - although I was wondering if we should remove that anyway, as there are no longer any recursive submodules now that TinyUSB doesn't have any submodules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now that TinyUSB doesn't have any submodules
Good point, I hadn't considered that! But might be better to err on the side of caution though, just in case we add any other submodules in future which do have submodules of their own? 🤔
|
||
SOURCE_DIR ${FETCHCONTENT_BASE_DIR}/pico_sdk-src | ||
BINARY_DIR ${FETCHCONTENT_BASE_DIR}/pico_sdk-build | ||
SUBBUILD_DIR ${FETCHCONTENT_BASE_DIR}/pico_sdk-subbuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we ever use this "subbuild" anywhere do we? Do we need to specify it?
This removes the deprecated uses of FetchContent_Populate (see #2124)
The SDK cannot just use MakeAvailable as the files shouldn't be added to the build, so instead this uses the full signature for FetchContent_Populate which has not been deprecated. The FetchContent_Declare call is kept in
pico_sdk_import.cmake
else it will re-clone the SDK for every new build directory whenPICO_SDK_FETCH_FROM_GIT_PATH
is set, rather than re-using the cloned SDK inPICO_SDK_FETCH_FROM_GIT_PATH
.Fixes #2124