diff options
author | Daniele E. Domenichelli <daniele.domenichelli@iit.it> | 2015-02-26 17:26:12 +0100 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-02-27 10:59:23 -0500 |
commit | a7631fc4e026f2e330b10eae73f473f240c3d0c1 (patch) | |
tree | d51c0ee64c296bedf59e18db82821457f93f3b66 /Modules/FeatureSummary.cmake | |
parent | 4efef3f775e78bdcb4591dc37aa974bc28e8fd84 (diff) | |
download | cmake-a7631fc4e026f2e330b10eae73f473f240c3d0c1.tar.gz |
Modules: Check for ARGC before using ARGV#
ARGV# could be defined from a parent scope.
Diffstat (limited to 'Modules/FeatureSummary.cmake')
-rw-r--r-- | Modules/FeatureSummary.cmake | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake index ce5a4ed605..dc3108623c 100644 --- a/Modules/FeatureSummary.cmake +++ b/Modules/FeatureSummary.cmake @@ -562,8 +562,14 @@ endfunction() # The stuff below is only kept for compatibility function(SET_PACKAGE_INFO _name _desc) - set(_url "${ARGV2}") - set(_purpose "${ARGV3}") + unset(_url) + unset(_purpose) + if(ARGC GREATER 2) + set(_url "${ARGV2}") + endif() + if(ARGC GREATER 3) + set(_purpose "${ARGV3}") + endif() set_property(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" ) if(NOT _url STREQUAL "") set_property(GLOBAL PROPERTY _CMAKE_${_name}_URL "${_url}" ) |