Skip to content

Commit

Permalink
refactor: require UseCython (like UseSWIG)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Jul 16, 2024
1 parent d971432 commit 0b49dc7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This provides helpers for using Cython. Use:

```cmake
find_package(Cython MODULE REQUIRED VERSION 3.0)
include(UseCython)
```

If you find Python beforehand, the search will take this into account. You can
Expand Down
4 changes: 1 addition & 3 deletions src/cython_cmake/cmake/FindCython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# ``Cython::Cython``
# The Cython executable
#
# A range of versions is supported on CMake 3.19+.
# A range of versions is supported on CMake 3.19+. See also UseCython.
#
# For more information on the Cython project, see https://cython.org/.
#
Expand Down Expand Up @@ -106,8 +106,6 @@ if(CYTHON_FOUND)
IMPORTED_LOCATION "${CYTHON_EXECUTABLE}"
)
endif()

include(UseCython)
endif()

mark_as_advanced(CYTHON_EXECUTABLE)
1 change: 1 addition & 0 deletions tests/packages/simple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ find_package(
COMPONENTS Interpreter Development.Module
REQUIRED)
find_package(Cython MODULE REQUIRED VERSION 3.0)
include(UseCython)

cython_compile_pyx(simple.pyx LANGUAGE C OUTPUT_VARIABLE simple_c)

Expand Down

0 comments on commit 0b49dc7

Please sign in to comment.