Skip to content

Commit 87af4f2

Browse files
jcfrvyasr
andcommitted
wip(UseCython): Rename ivar _output_syntax -> target_language
Co-authored-by: Vyas Ramasubramani <[email protected]>
1 parent 88de068 commit 87af4f2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

projects/core-cython-hello/cmake/UseCython.cmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ function(add_cython_target _name)
136136
set(_embed_main FALSE)
137137

138138
if("C" IN_LIST languages)
139-
set(_output_syntax "C")
139+
set(target_language "C")
140140
elseif("CXX" IN_LIST languages)
141-
set(_output_syntax "CXX")
141+
set(target_language "CXX")
142142
else()
143143
message(FATAL_ERROR "Either C or CXX must be enabled to use Cython")
144144
endif()
@@ -148,11 +148,11 @@ function(add_cython_target _name)
148148
endif()
149149

150150
if(_args_C)
151-
set(_output_syntax "C")
151+
set(target_language "C")
152152
endif()
153153

154154
if(_args_CXX)
155-
set(_output_syntax "CXX")
155+
set(target_language "CXX")
156156
endif()
157157

158158
# Doesn't select an input syntax - Cython
@@ -174,7 +174,7 @@ function(add_cython_target _name)
174174

175175
set(cxx_arg "")
176176
set(extension "c")
177-
if(_output_syntax STREQUAL "CXX")
177+
if(target_language STREQUAL "CXX")
178178
set(cxx_arg "--cplus")
179179
set(extension "cxx")
180180
endif()
@@ -198,7 +198,7 @@ function(add_cython_target _name)
198198
file(RELATIVE_PATH generated_file_relative
199199
${CMAKE_BINARY_DIR} ${generated_file})
200200

201-
set(comment "Generating ${_output_syntax} source ${generated_file_relative}")
201+
set(comment "Generating ${target_language} source ${generated_file_relative}")
202202
set(cython_include_directories "")
203203
set(pxd_dependencies "")
204204
set(c_header_dependencies "")
@@ -356,7 +356,7 @@ function(add_cython_target _name)
356356
--output-file ${generated_file}
357357
DEPENDS ${_source_file}
358358
${pxd_dependencies}
359-
IMPLICIT_DEPENDS ${_output_syntax}
359+
IMPLICIT_DEPENDS ${target_language}
360360
${c_header_dependencies}
361361
COMMENT ${comment})
362362

0 commit comments

Comments
 (0)