I'm not doing that at all. Apologies for lack of detail.<br><br>For example, I will have the following:<br><br>foo/bar/CMakeLists.txt<br><br>This file has the macro definition in it.<br><br>Now in:<br>foo/baz/something/CMakeLists.txt<br>
<br>I'm able to call the macro defined in the first CMakeLists.txt file. The only connection between all of these CMakeLists.txt files are add_subdirectory() commands. How can I figure out where the macro is coming from? I'm not sure how CMake is finding it.<br>
<br><div class="gmail_quote">On Tue, Mar 3, 2009 at 8:00 PM, Michael Jackson <span dir="ltr"><<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I will assume you are doing something like this:<br>
<br>
include(/path/to/file/with/macros.cmake)<br>
mymacro(args)<br>
<br>
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.<br>
<br>
<br>
_________________________________________________________<br>
Mike Jackson <a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
Principal Software Engineer Dayton, Ohio<div><div></div><div class="h5"><br>
<br>
<br>
<br>
On Mar 3, 2009, at 8:50 PM, Robert Dailey wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Hi,<br>
<br>
I've got the following directory structure on Windows:<br>
<br>
project/source/foo<br>
project/bar/stuff<br>
<br>
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.<br>
</div></div>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote>
<br>
</blockquote></div><br>