Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/cython_cmake/cmake/UseCython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
# case, a C++ file is generated by default.
#
# ``CYTHON_ARGS <args>``
# Specify additional arguments for the cythonization process.
# Specify additional arguments for the cythonization process. Will default to
# the ``CYTHON_ARGS`` variable if not specified.
#
# ``OUTPUT_VARIABLE <OutputVariable>``
# Set the variable ``<OutputVariable>`` in the parent scope to the path to the
Expand Down Expand Up @@ -91,6 +92,11 @@ function(Cython_compile_pyx)
message(FATAL_ERROR "Cython executable not found")
endif()

# Default to CYTHON_ARGS if argument not specified
if(NOT _args_CYTHON_ARGS AND DEFINED CYTHON_ARGS)
set(_args_CYTHON_ARGS "${CYTHON_ARGS}")
endif()

# Get source file location
set(_source_files ${_args_UNPARSED_ARGUMENTS})

Expand Down