Skip to content

Commit f9e745b

Browse files
committed
wip(UseCython): Add example of statement in pxd dependency analysis logic
1 parent 1867535 commit f9e745b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/cython_cmake/cmake/UseCython.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ function(add_cython_target _name)
232232
list(REMOVE_ITEM pxds_to_check "${pxd}")
233233

234234
# look for C headers
235+
#
236+
# cdef extern from "spam.h"
237+
#
235238
file(STRINGS "${pxd}" extern_from_statements
236239
REGEX "cdef[ ]+extern[ ]+from.*$")
237240
foreach(statement ${extern_from_statements})
@@ -251,6 +254,10 @@ function(add_cython_target _name)
251254

252255
# check for pxd dependencies
253256
# Look for cimport statements.
257+
#
258+
# cimport dishes
259+
# from dishes cimport spamdish
260+
#
254261
set(module_dependencies "")
255262
file(STRINGS "${pxd}" cimport_statements REGEX cimport)
256263
foreach(statement ${cimport_statements})
@@ -268,6 +275,9 @@ function(add_cython_target _name)
268275

269276
# check for pxi dependencies
270277
# Look for include statements.
278+
#
279+
# include "spamstuff.pxi"
280+
#
271281
set(include_dependencies "")
272282
file(STRINGS "${pxd}" include_statements REGEX include)
273283
foreach(statement ${include_statements})

0 commit comments

Comments
 (0)