diff options
author | Felix Schwitzer <flx107809@gmail.com> | 2018-06-11 18:24:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-06-12 13:55:53 (GMT) |
commit | 156138d5f1d15a79f86db64bbe2dd6043fd3b43f (patch) | |
tree | cf9f709e6574c9f1022f5af29a9cea3458f91930 | |
parent | 90ebc32d9e7400a590973b30c99f2986bcb2b755 (diff) | |
download | CMake-156138d5f1d15a79f86db64bbe2dd6043fd3b43f.zip CMake-156138d5f1d15a79f86db64bbe2dd6043fd3b43f.tar.gz CMake-156138d5f1d15a79f86db64bbe2dd6043fd3b43f.tar.bz2 |
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.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
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}" ) |