summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorRohit Goswami <rog32@hi.is>2021-11-14 20:24:04 +0000
committerRohit Goswami <rog32@hi.is>2021-11-15 03:49:21 +0000
commit27937472c698d4824236ae3198e92cfa758a48bc (patch)
tree769e462c6dde1adbfd3c85ccb3288e452ce5325d /doc/source
parent96851f58f7bcc0da375f4d4fbf5fcdbb8379e3b7 (diff)
downloadnumpy-27937472c698d4824236ae3198e92cfa758a48bc.tar.gz
DOC: Short note on the cmakelists.txt
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/f2py/buildtools/cmake.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/source/f2py/buildtools/cmake.rst b/doc/source/f2py/buildtools/cmake.rst
index 68ef800c7..0c7d4bf63 100644
--- a/doc/source/f2py/buildtools/cmake.rst
+++ b/doc/source/f2py/buildtools/cmake.rst
@@ -33,6 +33,13 @@ initialize a ``CMakeLists.txt`` file as follows:
.. literalinclude:: ./../code/CMakeLists.txt
:language: cmake
+A key element of the ``CMakeLists.txt`` file defined above is that the
+``add_custom_command`` is used to generate the wrapper ``C`` files and then
+added as a dependency of the actual shared library target via a
+``add_custom_target`` directive which prevents the command from running every
+time. Additionally, the method used for obtaining the ``fortranobject.c`` file
+can also be used to grab the ``numpy`` headers on older ``cmake`` versions.
+
This then works in the same manner as the other modules, although the naming
conventions are different and the output library is not automatically prefixed
with the ``cython`` information.