diff options
author | Chris Wright <chris@inkyspider.co.uk> | 2023-04-21 06:47:19 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2023-04-26 08:30:36 (GMT) |
commit | 550f63447d4c7d2db6ccbeaf1f6378aa6f7af4ed (patch) | |
tree | 2f9dca56e1a6891f614c52c78d8884f71c7e84ed /Source/cmPolicies.h | |
parent | e256e35daa79732a200883cef398fcd0f8227a3d (diff) | |
download | CMake-550f63447d4c7d2db6ccbeaf1f6378aa6f7af4ed.zip CMake-550f63447d4c7d2db6ccbeaf1f6378aa6f7af4ed.tar.gz CMake-550f63447d4c7d2db6ccbeaf1f6378aa6f7af4ed.tar.bz2 |
ExternalProject/FetchContent: Support relative remote URLs
Teach `ExternalProject_Add` and `FetchContent_Declare` to resolve
relative remote URLs provided via `GIT_REPOSITORY`. Add policy
CMP0150 to maintain compatibility.
Fixes: #24211
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
Diffstat (limited to 'Source/cmPolicies.h')
-rw-r--r-- | Source/cmPolicies.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index fe88382..23e50a9 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -450,7 +450,12 @@ class cmMakefile; 27, 0, cmPolicies::WARN) \ SELECT(POLICY, CMP0149, \ "Visual Studio generators select latest Windows SDK by default.", 3, \ - 27, 0, cmPolicies::WARN) + 27, 0, cmPolicies::WARN) \ + SELECT(POLICY, CMP0150, \ + "ExternalProject_Add and FetchContent_Declare commands " \ + "treat relative GIT_REPOSITORY paths as being relative " \ + "to the parent project's remote.", \ + 3, 27, 0, cmPolicies::WARN) #define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1) #define CM_FOR_EACH_POLICY_ID(POLICY) \ |