Преглед изворни кода

Help: Fix signature of add_library(<name> 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(<name> INTERFACE [<source>...] [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(<name> INTERFACE [EXCLUDE_FROM_ALL] [<source>...])

which places `EXCLUDE_FROM_ALL` in the same position used by the
documentation of other signatures.

Fixes: #25463
namniav пре 1 година
родитељ
комит
7fc6d7247a
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Help/command/add_library.rst

+ 1 - 1
Help/command/add_library.rst

@@ -144,7 +144,7 @@ itself and is not included as a target in the generated buildsystem.
 
 
   .. code-block:: cmake
   .. code-block:: cmake
 
 
-    add_library(<name> INTERFACE [<source>...] [EXCLUDE_FROM_ALL])
+    add_library(<name> INTERFACE [EXCLUDE_FROM_ALL] [<source>...])
 
 
   Source files may be listed directly in the ``add_library`` call or added
   Source files may be listed directly in the ``add_library`` call or added
   later by calls to :command:`target_sources` with the ``PRIVATE`` or
   later by calls to :command:`target_sources` with the ``PRIVATE`` or