diff options
author | Brad King <brad.king@kitware.com> | 2021-11-19 17:12:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-11-19 17:12:07 (GMT) |
commit | bad795939743289269ff6351adda181513a2772e (patch) | |
tree | b54457b0cb0020d0c92d2387a24067c5abb811e9 | |
parent | c468f983c000a853fa009cdc2f62d88c91f54540 (diff) | |
parent | 7224eb5185f6cbd3ce244e8ea5f6ec89d5a517f9 (diff) | |
download | CMake-bad795939743289269ff6351adda181513a2772e.zip CMake-bad795939743289269ff6351adda181513a2772e.tar.gz CMake-bad795939743289269ff6351adda181513a2772e.tar.bz2 |
Merge branch 'UseSWIG-create-workingdir' into release-3.21
Merge-request: !6750
-rw-r--r-- | Modules/UseSWIG.cmake | 2 | ||||
-rw-r--r-- | Tests/UseSWIG/CMakeLists.txt | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index 5c8f152..b48c33c 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -676,7 +676,7 @@ function(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) ${swig_custom_products} ${swig_cleanup_command} # Let's create the ${outdir} at execution time, in case dir contains $(OutDir) - COMMAND "${CMAKE_COMMAND}" -E make_directory ${outdir} ${outfiledir} + COMMAND "${CMAKE_COMMAND}" -E make_directory "${workingdir}" "${outdir}" "${outfiledir}" ${swig_timestamp_command} COMMAND "${CMAKE_COMMAND}" -E env "SWIG_LIB=${SWIG_DIR}" "${SWIG_EXECUTABLE}" "-${SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG}" diff --git a/Tests/UseSWIG/CMakeLists.txt b/Tests/UseSWIG/CMakeLists.txt index f1b2f32..6c0d5e4 100644 --- a/Tests/UseSWIG/CMakeLists.txt +++ b/Tests/UseSWIG/CMakeLists.txt @@ -76,6 +76,7 @@ if(SWIG_FOUND AND NOT SWIG_VERSION VERSION_LESS "4.0.2" ${build_generator_args} --build-project TestBasicPython --build-options ${build_options} -DSWIG_USE_SWIG_DEPENDENCIES=ON + "-DSWIG_OUTFILE_DIR=${CMake_BINARY_DIR}/Tests/UseSWIG/BasicPython.Depfile" --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> ) add_test(NAME UseSWIG.Depfile.BasicPerl COMMAND |