I ran a quick test:
function( test )
message( "SOME_TEST: ${SOME_TEST}" )
endfunction()
function( start )
set( SOME_TEST "HELLO WORLD" )
test()
endfunction()
start()
Seems like a function has access to the calling scope's defined variables.
I thought because functions created a new scope, that excluded access to
variables defined in the outer scope (i.e. calling scope)
Can someone explain?
---------
Robert Dailey
--
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