Commit 8b67fe2
authored
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]>1 parent d416d9b commit 8b67fe2
2 files changed
+48
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
865 | 888 | | |
866 | | - | |
| 889 | + | |
867 | 890 | | |
868 | | - | |
| 891 | + | |
| 892 | + | |
869 | 893 | | |
870 | 894 | | |
871 | 895 | | |
872 | | - | |
| 896 | + | |
873 | 897 | | |
874 | 898 | | |
875 | 899 | | |
| |||
980 | 1004 | | |
981 | 1005 | | |
982 | 1006 | | |
983 | | - | |
| 1007 | + | |
984 | 1008 | | |
985 | 1009 | | |
986 | 1010 | | |
| |||
1056 | 1080 | | |
1057 | 1081 | | |
1058 | 1082 | | |
1059 | | - | |
| 1083 | + | |
1060 | 1084 | | |
1061 | 1085 | | |
1062 | 1086 | | |
| |||
1071 | 1095 | | |
1072 | 1096 | | |
1073 | 1097 | | |
1074 | | - | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
1075 | 1116 | | |
1076 | 1117 | | |
1077 | 1118 | | |
| |||
0 commit comments