Michael Jackson wrote:
The subtle difference is this line from the "macro" help section:

Note that the parameters to a macro and values such as ARGN are not variables in the usual CMake sense. They are string replacements much like the c preprocessor would do with a macro. If you want true CMake variables you should look at the function command.

I should update this page to include functions and macros:
http://www.cmake.org/Wiki/CMake/Language_Syntax

The big difference is that functions have actual scope. I guess that is missing from here:

http://www.cmake.org/cmake/help/cmake2.6docs.html#command:function

The scope issue is covered here:

http://www.cmake.org/cmake/help/cmake2.6docs.html#command:set

-Bill
_______________________________________________
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

Reply via email to