-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace deprecated calls to FetchContent_Populate (#570)
* replace deprecated calls to FetchContent_Populate The single argument signature for FetchContent_Populate is deprecated with CMake 3.30. It was used, in order to call add_subdirectory manually with the EXCLUDE_FROM_ALL and SYSTEM flags. These have been added to FetchContent_Declare with 3.25 and 3.28. Calling FetchContent_MakeAvailable will internally call add_subdirectory with EXCLUDE_FROM_ALL and SYSTEM. There is therefore no need to call this manually. * fix: OPTIONS passed to CPMAddPackage not set where previously parsed in cpm_add_subdirectory which is not called on the new code path. * refactor: remove an unnecessary else branch * ci: include cmake 3.30 in test matrix * fix: forward SOURCE_SUBDIR to FetchContent_Declare For CMake version <3.28 this is done by calling add_subdirectory manually. For newer version FetchContent_Declare/MakeAvailable handles this for us. * fix: only set options if download_only is false this replicates the old behaviour * fix: DOWNLOAD_ONLY test * refactor: always use *_Populate to reduce code paths * Revert "refactor: always use *_Populate to reduce code paths" This reverts commit 0e8ca2a. --------- Co-authored-by: Avus <[email protected]>
- Loading branch information
Showing
2 changed files
with
48 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters