summaryrefslogtreecommitdiffstats
path: root/Modules/GenerateExportHeader.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/GenerateExportHeader.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/GenerateExportHeader.cmake')
-rw-r--r--Modules/GenerateExportHeader.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index 0c6256c..aab29ea 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -395,7 +395,7 @@ function(add_compiler_export_flags)
# Either return the extra flags needed in the supplied argument, or to the
# CMAKE_CXX_FLAGS if no argument is supplied.
- if(ARGV0)
+ if(ARGC GREATER 0)
set(${ARGV0} "${EXTRA_FLAGS}" PARENT_SCOPE)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}" PARENT_SCOPE)