diff options
author | Craig Scott <craig.scott@crascit.com> | 2024-01-27 00:44:01 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2024-01-27 00:44:01 (GMT) |
commit | aab6be9aad1e926ca2c0950b0abb7bf3c4b9105f (patch) | |
tree | e3656d82cd22c26a73035ed2162392f76642ae60 /Modules/ExternalProject.cmake | |
parent | e72791ecf69fba58803e0a71b71af5339af98da9 (diff) | |
download | CMake-aab6be9aad1e926ca2c0950b0abb7bf3c4b9105f.zip CMake-aab6be9aad1e926ca2c0950b0abb7bf3c4b9105f.tar.gz CMake-aab6be9aad1e926ca2c0950b0abb7bf3c4b9105f.tar.bz2 |
ExternalProject: Catch empty REMOTE or LOCAL earlier
If we are given an empty string for URL, or we have a logic error that leads
to the file we download to being an empty string, we will now catch this at
CMake configure time instead of whenever the download is attempted at
build time.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 77566b3..d7af1bd 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1518,6 +1518,13 @@ function(_ep_write_downloadfile_script netrc netrc_file ) + if("x${REMOTE}" STREQUAL "x") + message(FATAL_ERROR "REMOTE can't be empty") + endif() + if("x${LOCAL}" STREQUAL "x") + message(FATAL_ERROR "LOCAL can't be empty") + endif() + if(timeout) set(TIMEOUT_ARGS TIMEOUT ${timeout}) set(TIMEOUT_MSG "${timeout} seconds") |