From 156138d5f1d15a79f86db64bbe2dd6043fd3b43f Mon Sep 17 00:00:00 2001 From: Felix Schwitzer Date: Mon, 11 Jun 2018 20:24:41 +0200 Subject: 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`. --- Modules/UseSWIG.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index 8713cd8..1f36308 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -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}" ) -- cgit v0.12