Skip to content

Commit 81d674c

Browse files
henryiiijcfr
andcommitted
feat: Rename Cython_compile_pyx argument from OUTPUT_VAR to OUTPUT_VARIABLE
Co-authored-by: Jean-Christophe Fillion-Robin <[email protected]>
1 parent d7218ec commit 81d674c

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/cython_cmake/cmake/UseCython.cmake

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Cython_compile_pyx(<pyx_file1> [<pyx_file2> ...]
1111
# [TARGET_LANGUAGE C | CXX]
1212
# [LANGUAGE_LEVEL 2 | 3 | 3str]
13-
# [OUTPUT_VAR <OutputVar>])
13+
# [OUTPUT_VARIABLE <OutputVariable>])
1414
#
1515
# Options:
1616
#
@@ -31,14 +31,14 @@
3131
# ``CYTHON_ARGS <args>``
3232
# Specify additional arguments for the cythonization process.
3333
#
34-
# ``OUTPUT_VAR <OutputVar>``
35-
# Set the variable ``<OutputVar>`` in the parent scope to the path to the
34+
# ``OUTPUT_VARIABLE <OutputVariable>``
35+
# Set the variable ``<OutputVariable>`` in the parent scope to the path to the
3636
# generated source file. By default, ``<Name>`` is used as the output
3737
# variable name.
3838
#
3939
# Defined variables:
4040
#
41-
# ``<OutputVar>``
41+
# ``<OutputVariable>``
4242
# The path of the generated source file.
4343
#
4444
# Usage example:
@@ -48,7 +48,7 @@
4848
# find_package(Cython)
4949
#
5050
# Cython_compile_pyx(_hello.pyx
51-
# OUTPUT_VAR _hello_source_files
51+
# OUTPUT_VARIABLE _hello_source_files
5252
# )
5353
#
5454
# Python_add_library(_hello
@@ -221,7 +221,7 @@ function(add_cython_target _name)
221221
TARGET_LANGUAGE ${_target_language}
222222
LANGUAGE_LEVEL ${_language_level}
223223
CYTHON_ARGS ${_cython_args}
224-
OUTPUT_VAR ${_args_OUTPUT_VAR}
224+
OUTPUT_VARIABLE ${_args_OUTPUT_VAR}
225225
${_source_file}
226226
)
227227

@@ -232,7 +232,7 @@ endfunction()
232232

233233
function(Cython_compile_pyx)
234234
set(_options )
235-
set(_one_value LANGUAGE_LEVEL TARGET_LANGUAGE OUTPUT_VAR)
235+
set(_one_value LANGUAGE_LEVEL TARGET_LANGUAGE OUTPUT_VARIABLE)
236236
set(_multi_value CYTHON_ARGS)
237237

238238
cmake_parse_arguments(_args
@@ -324,9 +324,9 @@ function(Cython_compile_pyx)
324324
list(APPEND generated_files ${generated_file})
325325
endforeach()
326326

327-
if(_args_OUTPUT_VAR)
328-
set(_output_var ${_args_OUTPUT_VAR})
329-
set(${_output_var} ${generated_files} PARENT_SCOPE)
327+
if(_args_OUTPUT_VARIABLE)
328+
set(_output_variable ${_args_OUTPUT_VARIABLE})
329+
set(${_output_variable} ${generated_files} PARENT_SCOPE)
330330
endif()
331331

332332
endfunction()

tests/packages/simple/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ find_package(
77
REQUIRED)
88
find_package(Cython MODULE REQUIRED VERSION 3.0)
99

10-
cython_compile_pyx(simple.pyx TARGET_LANGUAGE C OUTPUT_VAR simple_c)
10+
cython_compile_pyx(simple.pyx TARGET_LANGUAGE C OUTPUT_VARIABLE simple_c)
1111

1212
python_add_library(simple MODULE "${simple_c}" WITH_SOABI)
1313

0 commit comments

Comments
 (0)