summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Schwitzer <flx107809@gmail.com>2018-06-11 20:24:41 +0200
committerBrad King <brad.king@kitware.com>2018-06-12 09:55:53 -0400
commit156138d5f1d15a79f86db64bbe2dd6043fd3b43f (patch)
treecf9f709e6574c9f1022f5af29a9cea3458f91930
parent90ebc32d9e7400a590973b30c99f2986bcb2b755 (diff)
downloadcmake-156138d5f1d15a79f86db64bbe2dd6043fd3b43f.tar.gz
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`.
-rw-r--r--Modules/UseSWIG.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 8713cd8be5..1f36308f90 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}" )