mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
UseSWIG: ensure directory for depfile exists
When `Visual Studio` and `Xcode` generators are used, directory for depfile is not implicitely created by CMake when OUTFILE_DIR option is used. Fixes: #22932
This commit is contained in:
@@ -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}"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user