summaryrefslogtreecommitdiffstats
path: root/Modules/FeatureSummary.cmake
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <daniele.domenichelli@iit.it>2015-02-26 16:26:12 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-27 15:59:23 (GMT)
commita7631fc4e026f2e330b10eae73f473f240c3d0c1 (patch)
treed51c0ee64c296bedf59e18db82821457f93f3b66 /Modules/FeatureSummary.cmake
parent4efef3f775e78bdcb4591dc37aa974bc28e8fd84 (diff)
downloadCMake-a7631fc4e026f2e330b10eae73f473f240c3d0c1.zip
CMake-a7631fc4e026f2e330b10eae73f473f240c3d0c1.tar.gz
CMake-a7631fc4e026f2e330b10eae73f473f240c3d0c1.tar.bz2
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.cmake10
1 files changed, 8 insertions, 2 deletions
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index ce5a4ed..dc31086 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}" )