22#
33# The following functions are defined:
44#
5- # .. cmake:command:: Cython_compile_pyx
5+ # .. cmake:command:: Cython_transpile
66#
77# Create custom rules to generate the source code for a Python extension module
88# using cython.
99#
10- # Cython_compile_pyx (<pyx_file>
11- # [LANGUAGE C | CXX]
12- # [CYTHON_ARGS <args> ...]
13- # [OUTPUT <OutputFile>]
14- # [OUTPUT_VARIABLE <OutputVariable>])
10+ # Cython_transpile (<pyx_file>
11+ # [LANGUAGE C | CXX]
12+ # [CYTHON_ARGS <args> ...]
13+ # [OUTPUT <OutputFile>]
14+ # [OUTPUT_VARIABLE <OutputVariable>])
1515#
1616# Options:
1717#
4444# find_package(Cython)
4545# include(UseCython)
4646#
47- # Cython_compile_pyx (_hello.pyx
47+ # Cython_transpile (_hello.pyx
4848# OUTPUT_VARIABLE _hello_source_files
4949# )
5050#
@@ -76,7 +76,7 @@ if(CMAKE_VERSION VERSION_LESS "3.8")
7676 message (FATAL_ERROR "CMake 3.8 required for COMMAND_EXPAND_LISTS" )
7777endif ()
7878
79- function (Cython_compile_pyx )
79+ function (Cython_transpile )
8080 set (_options )
8181 set (_one_value LANGUAGE OUTPUT OUTPUT_VARIABLE )
8282 set (_multi_value CYTHON_ARGS)
@@ -110,14 +110,14 @@ function(Cython_compile_pyx)
110110 message (FATAL_ERROR "One and only one input file must be specified, got '${_source_files} '" )
111111 endif ()
112112
113- function (_compile_pyx _source_file generated_file language )
113+ function (_transpile _source_file generated_file language )
114114
115115 if (language STREQUAL "C" )
116116 set (_language_arg "" )
117117 elseif (language STREQUAL "CXX" )
118118 set (_language_arg "--cplus" )
119119 else ()
120- message (FATAL_ERROR "_compile_pyx language must be one of C or CXX" )
120+ message (FATAL_ERROR "_transpile language must be one of C or CXX" )
121121 endif ()
122122
123123 set_source_files_properties (${generated_file} PROPERTIES GENERATED TRUE )
@@ -215,7 +215,7 @@ function(Cython_compile_pyx)
215215 endif ()
216216
217217 if (NOT _language MATCHES "^(C|CXX)$" )
218- message (FATAL_ERROR "cython_compile_pyx LANGUAGE must be one of C or CXX" )
218+ message (FATAL_ERROR "Cython_transpile LANGUAGE must be one of C or CXX" )
219219 endif ()
220220
221221 # Place the cython files in the current binary dir if no path given
@@ -226,7 +226,7 @@ function(Cython_compile_pyx)
226226 endif ()
227227
228228 set (generated_file ${_args_OUTPUT} )
229- _compile_pyx (${_source_file} ${generated_file} ${_language} )
229+ _transpile (${_source_file} ${generated_file} ${_language} )
230230 list (APPEND generated_files ${generated_file} )
231231
232232 # Output variable only if set
0 commit comments