build: improve AddCMockaTest `LINK_OPTIONS` docs

The `LINK_OPTIONS` argument for `add_cmocka_test()` doesn't
set the `LINK_OPTIONS` CMake property, as it was only added
in CMake 3.13.

These options are mostly the same, but some options that are valid
`LINK_OPTIONS` are not valid `LINK_FLAGS` (e.g using `LINKER:` prefixes)

This commit documents that the `LINK_OPTIONS` argument instead
is used to set the `LINK_FLAGS` CMake property.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Alois Klink 2022-11-01 15:16:37 +00:00 committed by Andreas Schneider
parent 57234cdef3
commit 426784f405
1 changed files with 4 additions and 1 deletions

View File

@ -38,7 +38,10 @@
# executable.
#
# ``LINK_OPTIONS``:
# Optional, expects one or more options to be passed to the linker
# Optional, expects one or more ``LINK_FLAGS`` to be passed to the linker.
# For CMake <3.13 compatibility, this is **not** set as the ``LINK_OPTIONS``
# property. Instead, these values are set the ``LINK_FLAGS`` property.
# See https://cmake.org/cmake/help/latest/prop_tgt/LINK_FLAGS.html
#
#
# Example: