[CMake] Scope of a macro
Michael Jackson
mike.jackson at bluequartz.net
Tue Mar 3 21:00:42 EST 2009
I will assume you are doing something like this:
include(/path/to/file/with/macros.cmake)
mymacro(args)
The easiest way to think of "include" is the same as a C/C++ #include.
CMake will take the contents of the file and "place" it inline in the
cmake file that is using the 'include' command. In that respect there
is no "scope". As long as CMake can open the file it can be included.
_________________________________________________________
Mike Jackson mike.jackson at bluequartz.net
BlueQuartz Software www.bluequartz.net
Principal Software Engineer Dayton, Ohio
On Mar 3, 2009, at 8:50 PM, Robert Dailey wrote:
> Hi,
>
> I've got the following directory structure on Windows:
>
> project/source/foo
> project/bar/stuff
>
> In the first directory, I have a CMakeLists.txt which defines a
> macro. However, I am able to call that from the CMakeLists.txt
> inside of the second directory. Does the scope of a macro not
> respect directory location/depth? I'm using CMake version 2.6.3.
> _______________________________________________
> 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
More information about the CMake
mailing list