Browse Source

UseSWIG: note dependency behavior for Make generators

See: #20067
Ben Boeckel 5 years ago
parent
commit
1f543b23a8
1 changed files with 8 additions and 0 deletions
  1. 8 0
      Modules/UseSWIG.cmake

+ 8 - 0
Modules/UseSWIG.cmake

@@ -41,6 +41,14 @@ Defines the following command for use with ``SWIG``:
     configuration-specific files generated by ``SWIG``. All build
     configurations must result in the same generated source file.
 
+  .. note::
+
+    For Make-based generators, ``swig_add_library`` does not track file
+    dependencies, so depending on the ``<name>_swig_compilation`` custom target
+    is required for targets which require the ``swig``-generated files to
+    exist. Other generators may depend on the source files that would be
+    generated by SWIG.
+
   ``TYPE``
     ``SHARED``, ``MODULE`` and ``STATIC`` have the same semantic as for the
     :command:`add_library` command. If ``USE_BUILD_SHARED_LIBS`` is specified,