2011/7/19 Laszlo Papp <[email protected]>:
> Hi,
>
> Is there a way of passing array arguments to a macro with cmake ?
Did you have a look at:
CMakeParseArguments.cmake
cmake --help-module CMakeParseArguments
This makes it easier to parse KEYWORD arguments.
[...]
> The problem is that when I would like to use the aforementioned macro
> like this:
> UNIT_TESTS(
> ${CORE_LIBS}# libraries argument
> core # modulename argument
> objecttest
> )
Then using the indicated module you may turn your MACRO into
something like:
UNIT_TESTS(
LIBRARIES ${CORE_LIBS}
MODULENAME core
TEST objecttests)
[...]
> The workaround can be that I determine an internal variable that can
> be filled out with the proper content and use that internally inside
> the macro, but I do not consider that nice solution. The best would be
> if we can somehow pass array type arguments to the cmake macro. Is
> that possible ? Does it already somehow work like that ?
Keyword introduced arguments + ParseArgument should work.
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
_______________________________________________
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