UseSWIG: XXX.py files created in wrong directory for multi-config generators
Originally discovered in !1891 (merged), when using a multi-config generator like Visual Studio or Xcode, any of the SWIG Python tests such as UseSWIG.LegacyPython fail as a result of generating the
example.py in the
CMAKE_CURRENT_BINARY_DIR, but the other associated files like
_example.pyd, etc. are created in the config-specific subdirectory below that point. When the tests run, they can't find the generated
example.py file (verified by manually copying the file into the config-specific subdirectory and re-running the test which then passes). The problem existed before the changes in !1891 (merged), but it is easier to see after that merge request since the UseSWIG.LegacyPython test can be run directly and its output shown more easily.