An update will be applied December 9th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit b12069f7 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'UseSWIG-fix-regression'

bc3697fa

 UseSWIG: Restore support for like-named .i files in different modules
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1734
parents 457bcbd4 bc3697fa
......@@ -219,7 +219,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
if(CMAKE_GENERATOR MATCHES "Make")
get_filename_component(swig_generated_timestamp
"${swig_generated_file_fullname}" NAME_WE)
set(swig_gen_target gen_${swig_generated_timestamp})
set(swig_gen_target gen_${name}_${swig_generated_timestamp})
set(swig_generated_timestamp
"${swig_outdir}/${swig_generated_timestamp}.stamp")
set(swig_custom_output ${swig_generated_timestamp})
......@@ -311,9 +311,11 @@ macro(SWIG_ADD_LIBRARY name)
endforeach()
set(swig_generated_sources)
set(swig_generated_targets)
foreach(it ${swig_dot_i_sources})
SWIG_ADD_SOURCE_TO_MODULE(${name} swig_generated_source ${it})
set(swig_generated_sources ${swig_generated_sources} "${swig_generated_source}")
list(APPEND swig_generated_targets "${swig_gen_target}")
endforeach()
get_directory_property(swig_extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
set_directory_properties(PROPERTIES
......@@ -324,7 +326,7 @@ macro(SWIG_ADD_LIBRARY name)
${swig_other_sources})
if(CMAKE_GENERATOR MATCHES "Make")
# see IMPLICIT_DEPENDS above
add_dependencies(${SWIG_MODULE_${name}_REAL_NAME} ${swig_gen_target})
add_dependencies(${SWIG_MODULE_${name}_REAL_NAME} ${swig_generated_targets})
endif()
if("${_SAM_TYPE}" STREQUAL "MODULE")
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES NO_SONAME ON)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment