Skip to content

Commit 11f5c30

Browse files
henryiiijcfr
andcommitted
feat: Improve message associated with cython custom command
Co-authored-by: Jean-Christophe Fillion-Robin <[email protected]>
1 parent f84b24d commit 11f5c30

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/cython_cmake/cmake/UseCython.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,15 @@ function(Cython_compile_pyx)
125125
set(_depfile ${generated_file}.dep)
126126
set(_depfile_arg "-M")
127127

128+
# Normalize the input path
129+
get_filename_component(_source_file "${_source_file}" ABSOLUTE)
130+
131+
# Pretty-printed output names
128132
file(RELATIVE_PATH generated_file_relative
129133
${CMAKE_BINARY_DIR} ${generated_file})
130-
131-
set(comment "Generating ${_language} source ${generated_file_relative}")
134+
file(RELATIVE_PATH source_file_relative
135+
${CMAKE_SOURCE_DIR} ${_source_file})
136+
set(comment "Generating ${_language} source '${generated_file_relative}' from '${source_file_relative}'")
132137

133138
get_source_file_property(pyx_location ${_source_file} LOCATION)
134139

0 commit comments

Comments
 (0)