Skip to content

Commit

Permalink
wip(UseCython): Rename ivar py_version_arg -> language_level_arg
Browse files Browse the repository at this point in the history
Co-authored-by: Vyas Ramasubramani <[email protected]>
  • Loading branch information
jcfr and vyasr committed Dec 14, 2023
1 parent 87af4f2 commit 1377edb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions projects/core-cython-hello/cmake/UseCython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ function(add_cython_target _name)
set(extension "cxx")
endif()

set(py_version_arg "")
set(language_level_arg "")
if(_input_syntax STREQUAL "PY2")
set(py_version_arg "-2")
set(language_level_arg "-2")
elseif(_input_syntax STREQUAL "PY3")
set(py_version_arg "-3")
set(language_level_arg "-3")
endif()

set(generated_file "${CMAKE_CURRENT_BINARY_DIR}/${_name}.${extension}")
Expand Down Expand Up @@ -350,7 +350,7 @@ function(add_cython_target _name)
# Add the command to run the compiler.
add_custom_command(OUTPUT ${generated_file}
COMMAND ${CYTHON_EXECUTABLE}
ARGS ${cxx_arg} ${include_directory_arg} ${py_version_arg}
ARGS ${cxx_arg} ${include_directory_arg} ${language_level_arg}
${embed_arg} ${annotate_arg} ${cython_debug_arg}
${line_directives_arg} ${CYTHON_FLAGS_LIST} ${pyx_location}
--output-file ${generated_file}
Expand Down

0 comments on commit 1377edb

Please sign in to comment.