[CMake] Fwd: Problem with PARENT_SCOPE

ankit jain ankitguddu at gmail.com
Thu Feb 12 01:24:09 EST 2009


---------- Forwarded message ----------
From: ankit jain <ankitguddu at gmail.com>
Date: 2009/2/12
Subject: Problem with PARENT_SCOPE
To: cmake at cmake.org


Hi all,

Actually i am usinf PARENT_SCOPE property but facing some problem.

the directory structure i have is like this
f1
...f2
    .....f3 (inside f2)
 i.e f1 has f2 folder and f2 has f3

in f3 i have demo.cpp file

i set a variable for this file as set(myvar demo.cpp)
Also i did set(myvar1 ${myvar} PARENT_SCOPE)

Due to this now myvar1 should be visible in f2 which has value demo.cpp

now what i want actually is that myvar1 should be visible in f1 but if did
like this in f2:
set(myvar2 ${myvar1} PARENT_SCOPE)

it is not working. i dont know why.
Is iam doing something wrong.

Please guide me how to make a variable of folder f3 visible in folder f1

Regards-
Ankit

Hi all,

Its working now
The problem is that i have to set the variable parent scope line after
adding the subdirectory.

Ankit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090212/c7dd9394/attachment.htm>


More information about the CMake mailing list