Skip to content

Commit d5e69e4

Browse files
henryiiijcfr
authored andcommitted
refactor: require UseCython (like UseSWIG)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 067082a commit d5e69e4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ This provides helpers for using Cython. Use:
1919

2020
```cmake
2121
find_package(Cython MODULE REQUIRED VERSION 3.0)
22+
include(UseCython)
2223
```
2324

2425
If you find Python beforehand, the search will take this into account. You can

src/cython_cmake/cmake/FindCython.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# ``Cython::Cython``
1919
# The Cython executable
2020
#
21-
# A range of versions is supported on CMake 3.19+.
21+
# A range of versions is supported on CMake 3.19+. See also UseCython.
2222
#
2323
# For more information on the Cython project, see https://cython.org/.
2424
#
@@ -106,8 +106,6 @@ if(CYTHON_FOUND)
106106
IMPORTED_LOCATION "${CYTHON_EXECUTABLE}"
107107
)
108108
endif()
109-
110-
include(UseCython)
111109
endif()
112110

113111
mark_as_advanced(CYTHON_EXECUTABLE)

tests/packages/simple/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ find_package(
66
COMPONENTS Interpreter Development.Module
77
REQUIRED)
88
find_package(Cython MODULE REQUIRED VERSION 3.0)
9+
include(UseCython)
910

1011
cython_compile_pyx(simple.pyx LANGUAGE C OUTPUT_VARIABLE simple_c)
1112

0 commit comments

Comments
 (0)