mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 20:00:38 -06:00
UseSWIG: Fix handling of SWIG_MODULE_NAME source file property
Fix a typo from commit 0bef9eb410 (UseSWIG: modernize module,
2018-01-29) that caused `UseSWIG` to ignore an eventually set property
`SWIG_MODLUE_NAME`.
Building multiple python modules using the mentioned property as
described in the docs could lead to an invalid, or even worse,
inconsistent `build.ninja` file. The reason is that the generated list
of support files was not unique. For each module the support file was
always named the same, namely `path/to/builddir/MODULENAME.py`.
This commit is contained in:
committed by
Brad King
parent
90ebc32d9e
commit
156138d5f1
@@ -237,7 +237,7 @@ function(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile)
|
||||
set(files)
|
||||
get_source_file_property(module_basename
|
||||
"${infile}" SWIG_MODULE_NAME)
|
||||
if(NOT swig_module_basename)
|
||||
if(NOT module_basename)
|
||||
|
||||
# try to get module name from "%module foo" syntax
|
||||
if ( EXISTS "${infile}" )
|
||||
|
||||
Reference in New Issue
Block a user