aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-11-25 12:47:49 -0800
committerRobert Schumacher <roschuma@microsoft.com>2017-11-25 12:47:49 -0800
commit89983fe102520c7a063ff349ac824995b1832a97 (patch)
tree28b57c386fe90b08cf21ef25f61f79683e5a5374 /scripts
parentdbe732fd8a283235d6e44b85997c5d80290925d2 (diff)
downloadvcpkg-89983fe102520c7a063ff349ac824995b1832a97.tar.gz
vcpkg-89983fe102520c7a063ff349ac824995b1832a97.zip
[vcpkg-from-github] Improve argument handling
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_from_github.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake
index 5730ce39a..b71ab3838 100644
--- a/scripts/cmake/vcpkg_from_github.cmake
+++ b/scripts/cmake/vcpkg_from_github.cmake
@@ -54,19 +54,19 @@ function(vcpkg_from_github)
set(multipleValuesArgs)
cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN})
- if(NOT _vdud_OUT_SOURCE_PATH)
+ if(NOT DEFINED _vdud_OUT_SOURCE_PATH)
message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.")
endif()
- if((_vdud_REF AND NOT _vdud_SHA512) OR (NOT _vdud_REF AND _vdud_SHA512))
+ if((DEFINED _vdud_REF AND NOT DEFINED _vdud_SHA512) OR (NOT DEFINED _vdud_REF AND DEFINED _vdud_SHA512))
message(FATAL_ERROR "SHA512 must be specified if REF is specified.")
endif()
- if(NOT _vdud_REPO)
+ if(NOT DEFINED _vdud_REPO)
message(FATAL_ERROR "The GitHub repository must be specified.")
endif()
- if(NOT _vdud_REF AND NOT _vdud_HEAD_REF)
+ if(NOT DEFINED _vdud_REF AND NOT DEFINED _vdud_HEAD_REF)
message(FATAL_ERROR "At least one of REF and HEAD_REF must be specified.")
endif()
@@ -90,7 +90,7 @@ function(vcpkg_from_github)
endif()
endmacro()
- if(VCPKG_USE_HEAD_VERSION AND NOT _vdud_HEAD_REF)
+ if(VCPKG_USE_HEAD_VERSION AND NOT DEFINED _vdud_HEAD_REF)
message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.")
set(VCPKG_USE_HEAD_VERSION OFF)
endif()