Make the explicit libs variable usage an arguement of the generic macro
author Laszlo Papp
()
committer Laszlo Papp
()
commit 08d8cfca04e4c35ebade55bab6162acc905edb46
tree f53a196957c5ff93fa29833e903158c00983d7f3
parent 7ba6d056cec7322cf92ab26b5ebea75a54f78cee
Make the explicit libs variable usage an arguement of the generic macro

After a while, some research and discussion, we have two ways of handling the
libs variable usage.

1) CMakeParseArguments.cmake way (ie.: cmake --help-module CMakeParseArguments)
This makes it easier to parse KEYWORD arguments.
Then using the indicated module you may turn your MACRO into
something like:
UNIT_TESTS(LIBRARIES ${CORE_LIBS} MODULENAME core TEST objecttests)

The only problem is that with this solution it is a bit more intrusive and
which is a bigger issue is that this feature has been introduced in the cmake
version 2.8.3. It is not that big problem itself as such in most situations.
However, Harmattan and older platforms come with cmake 2.8+, but for instance
2.8.2. I ignored this alternative for now because of these reasons.

2) Using "${UNIT_TEST_LIBS}" like variable. The point is the double quote here.
I chose this solution because it requires very little change in the codebase
and still makes very nice. On the other hand that is how array type arguement
passing works with cmake.
audio/tests/CMakeLists.txt
cmake/GluonMacros.cmake
core/tests/CMakeLists.txt
input/tests/CMakeLists.txt