[cmake-developers] [CMake 0015093]: PARENT_SCOPE empties variables when recursived used
Mantis Bug Tracker
mantis at public.kitware.com
Mon Aug 18 02:05:54 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=15093
======================================================================
Reported By: abma
Assigned To:
======================================================================
Project: CMake
Issue ID: 15093
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-08-18 02:05 EDT
Last Modified: 2014-08-18 02:05 EDT
======================================================================
Summary: PARENT_SCOPE empties variables when recursived used
Description:
when a PARENT_SCOPE'd variable is set to a value of a PARENT_SCOPE'd variable,
both are empty:
set(a "a" PARENT_SCOPE)
set(b "${a}" PARENT_SCOPE)
expected result:
a = "a"
b = "a"
but in real both are empty!
Additional Information:
can be workarounded:
macro(MakeGlobalVar varname)
set(${varname} ${ARGN} PARENT_SCOPE)
set(${varname} ${ARGN})
endmacro()
MakeGlobalVar(a "a")
MakeGlobalVar(b "${a}")
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-08-18 02:05 abma New Issue
======================================================================
More information about the cmake-developers
mailing list