diff options
author | Brad King <brad.king@kitware.com> | 2014-02-26 14:38:50 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-02-26 14:38:50 (GMT) |
commit | 5cad466daefa64578d4e4ca0394db983ab40bba4 (patch) | |
tree | 0c493d907741002aed001ca2e788842849232a83 /Modules | |
parent | c859d176a15326cd1ef7b5c35908f28313d1be19 (diff) | |
parent | f0111deb1ea21f667b2fbf57f55d5ee2a80f5ccc (diff) | |
download | CMake-5cad466daefa64578d4e4ca0394db983ab40bba4.zip CMake-5cad466daefa64578d4e4ca0394db983ab40bba4.tar.gz CMake-5cad466daefa64578d4e4ca0394db983ab40bba4.tar.bz2 |
Merge topic 'UseSWIG-avoid-extra-rebuilds'
f0111deb UseSWIG: Name extra generated files after module name (#10080)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/UseSWIG.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index 11ca205..4ae6f81 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -85,9 +85,6 @@ macro(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile) set(${outfiles} "") get_source_file_property(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename ${infile} SWIG_MODULE_NAME) - if(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND") - get_filename_component(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename "${infile}" NAME_WE) - endif() foreach(it ${SWIG_${language}_EXTRA_FILE_EXTENSION}) set(${outfiles} ${${outfiles}} "${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}.${it}") @@ -103,6 +100,10 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) get_source_file_property(swig_source_file_generated ${infile} GENERATED) get_source_file_property(swig_source_file_cplusplus ${infile} CPLUSPLUS) get_source_file_property(swig_source_file_flags ${infile} SWIG_FLAGS) + get_source_file_property(_SWIG_MODULE_NAME ${infile} SWIG_MODULE_NAME) + if ( NOT _SWIG_MODULE_NAME ) + set_source_files_properties(${infile} PROPERTIES SWIG_MODULE_NAME ${name}) + endif () if("${swig_source_file_flags}" STREQUAL "NOTFOUND") set(swig_source_file_flags "") endif() |