From 7fc6d7247a0cf4aa2379dc4e44536d628612f8d4 Mon Sep 17 00:00:00 2001 From: namniav Date: Mon, 4 Dec 2023 04:25:25 +0800 Subject: Help: Fix signature of add_library( INTERFACE EXCLUDE_FROM_ALL) This signature was added by commit 4391913133 (Add INTERFACE libraries to generated buildsystem if they have SOURCES, 2020-07-20, v3.19.0-rc1~346^2~1) with incorrect documentation. Previously the documented signature as: add_library( INTERFACE [...] [EXCLUDE_FROM_ALL]) which is incorrect. CMake would recognize `EXCLUDE_FROM_ALL` as a source file and report an error that it doesn't exists. The correct signature is: add_library( INTERFACE [EXCLUDE_FROM_ALL] [...]) which places `EXCLUDE_FROM_ALL` in the same position used by the documentation of other signatures. Fixes: #25463 --- Help/command/add_library.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst index 07c8bab..80d5dee 100644 --- a/Help/command/add_library.rst +++ b/Help/command/add_library.rst @@ -144,7 +144,7 @@ itself and is not included as a target in the generated buildsystem. .. code-block:: cmake - add_library( INTERFACE [...] [EXCLUDE_FROM_ALL]) + add_library( INTERFACE [EXCLUDE_FROM_ALL] [...]) Source files may be listed directly in the ``add_library`` call or added later by calls to :command:`target_sources` with the ``PRIVATE`` or -- cgit v0.12