On 2010-05-03 15:19, Alexander Neundorf wrote:
On Monday 03 May 2010, Benoit Thomas wrote:
function (foo v)
bar (${v} PARENT_SCOPE)
endfunction()
You could have bar() use PARENT_SCOPE to set it in a variable in bar(), which
could then itself set it to PARENT_SCOPE.
Would that work ?
Clinton Stimpson proposed a solution like that, which worked fine. I'm
still trying to make it work correctly in my real project but I think
I'm gonna go with something along those lines.
foo (v)
message ("${v} == 1")
If it's not possible, I'll go with global variables. Currently, I do
global variables by doing:
set (v 1 CACHE INTERNAL "" FORCE)
But is there a better way ?
You could also set a GLOBAL property, that's more similar to a normal variable
than a forced CACHE variable.
I didn't think of this, but will try it, thanks.
--
Ben.
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake