[CMake] Function declaration scope

Robert Bielik Robert.Bielik at dirac.com
Tue Nov 29 09:42:49 EST 2016


Hmm.. using v3.7 the answer is no, i.e. a function declared in a subfolder will be available in parent scope. Seems a bit odd, doesn't it ?

Regards
/R

>-----Original Message-----
>From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Robert Bielik
>Sent: den 29 november 2016 15:22
>To: Cmake at cmake.org
>Subject: [CMake] Function declaration scope
>
>Question: When declaring a function within a sub CMakeLists.txt file, is that
>function "scoped", i.e. non-existing in parent scope ?
>
>Regards
>/Robert
>
>--
>
>Powered by www.kitware.com
>
>Please keep messages on-topic and check the CMake FAQ at:
>http://www.cmake.org/Wiki/CMake_FAQ
>
>Kitware offers various services to support the CMake community. For more
>information on each offering, please visit:
>
>CMake Support: http://cmake.org/cmake/help/support.html
>CMake Consulting: http://cmake.org/cmake/help/consulting.html
>CMake Training Courses: http://cmake.org/cmake/help/training.html
>
>Visit other Kitware open-source projects at
>http://www.kitware.com/opensource/opensource.html
>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/cmake


More information about the CMake mailing list