mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
Modules: Check for ARGC before using ARGV#
ARGV# could be defined from a parent scope.
This commit is contained in:
committed by
Brad King
parent
4efef3f775
commit
a7631fc4e0
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user