From 426784f40564ffccbf83284b7ed6ac627652a6b1 Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Tue, 1 Nov 2022 15:16:37 +0000 Subject: [PATCH] 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 --- cmake/Modules/AddCMockaTest.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/AddCMockaTest.cmake b/cmake/Modules/AddCMockaTest.cmake index 12fbd79..916088b 100644 --- a/cmake/Modules/AddCMockaTest.cmake +++ b/cmake/Modules/AddCMockaTest.cmake @@ -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: