49
49
# )
50
50
#
51
51
# Python_add_library(_hello
52
- # MODULE ${_hello_source_files}
52
+ # MODULE " ${_hello_source_files}"
53
53
# WITH_SOABI
54
54
# )
55
55
#
@@ -134,9 +134,9 @@ function(Cython_transpile)
134
134
135
135
# Pretty-printed output names
136
136
file (RELATIVE_PATH generated_file_relative
137
- ${CMAKE_BINARY_DIR} ${generated_file} )
137
+ " ${CMAKE_BINARY_DIR} " " ${generated_file} " )
138
138
file (RELATIVE_PATH source_file_relative
139
- ${CMAKE_SOURCE_DIR} ${_source_file} )
139
+ " ${CMAKE_SOURCE_DIR} " " ${_source_file} " )
140
140
set (comment "Generating ${_language} source '${generated_file_relative} ' from '${source_file_relative} '" )
141
141
142
142
# Get output directory to ensure its exists
@@ -146,23 +146,23 @@ function(Cython_transpile)
146
146
147
147
# Add the command to run the compiler.
148
148
add_custom_command (
149
- OUTPUT ${generated_file}
149
+ OUTPUT " ${generated_file} "
150
150
COMMAND
151
- ${CMAKE_COMMAND} -E make_directory ${output_directory}
151
+ " ${CMAKE_COMMAND} " -E make_directory " ${output_directory} "
152
152
COMMAND
153
153
${_cython_command}
154
154
${_language_arg}
155
155
"${_args_CYTHON_ARGS} "
156
156
${_depfile_arg}
157
- ${pyx_location}
158
- --output-file ${generated_file}
157
+ " ${pyx_location} "
158
+ --output-file " ${generated_file} "
159
159
COMMAND_EXPAND_LISTS
160
160
MAIN_DEPENDENCY
161
- ${_source_file}
161
+ " ${_source_file} "
162
162
DEPFILE
163
- ${_depfile}
163
+ " ${_depfile} "
164
164
VERBATIM
165
- COMMENT ${comment}
165
+ COMMENT " ${comment} "
166
166
)
167
167
endfunction ()
168
168
@@ -179,10 +179,10 @@ function(Cython_transpile)
179
179
# cmake_path(GET _input_file STEM basename)
180
180
get_filename_component (_basename "${_input_file} " NAME_WE )
181
181
182
- if (IS_ABSOLUTE ${_input_file} )
183
- file (RELATIVE_PATH _input_relative ${CMAKE_CURRENT_SOURCE_DIR} ${_input_file} )
182
+ if (IS_ABSOLUTE " ${_input_file} " )
183
+ file (RELATIVE_PATH _input_relative " ${CMAKE_CURRENT_SOURCE_DIR} " " ${_input_file} " )
184
184
else ()
185
- set (_input_relative ${_input_file} )
185
+ set (_input_relative " ${_input_file} " )
186
186
endif ()
187
187
188
188
get_filename_component (_output_relative_dir "${_input_relative} " DIRECTORY )
@@ -222,19 +222,19 @@ function(Cython_transpile)
222
222
223
223
# Place the cython files in the current binary dir if no path given
224
224
if (NOT _args_OUTPUT )
225
- _set_output (${_source_file} ${_language} _args_OUTPUT )
226
- elseif (NOT IS_ABSOLUTE ${_args_OUTPUT} )
225
+ _set_output (" ${_source_file} " ${_language} _args_OUTPUT )
226
+ elseif (NOT IS_ABSOLUTE " ${_args_OUTPUT} " )
227
227
set (_args_OUTPUT "${CMAKE_CURRENT_BINARY_DIR} /${_args_OUTPUT} " )
228
228
endif ()
229
229
230
- set (generated_file ${_args_OUTPUT} )
231
- _transpile (${_source_file} ${generated_file} ${_language} )
232
- list (APPEND generated_files ${generated_file} )
230
+ set (generated_file " ${_args_OUTPUT} " )
231
+ _transpile (" ${_source_file} " " ${generated_file} " ${_language} )
232
+ list (APPEND generated_files " ${generated_file} " )
233
233
234
234
# Output variable only if set
235
235
if (_args_OUTPUT_VARIABLE )
236
236
set (_output_variable ${_args_OUTPUT_VARIABLE} )
237
- set (${_output_variable} ${generated_files} PARENT_SCOPE )
237
+ set (${_output_variable} " ${generated_files} " PARENT_SCOPE )
238
238
endif ()
239
239
240
240
endfunction ()
0 commit comments