On Tue, May 5, 2026 at 11:33 AM Jun Omae <[email protected]> wrote:
>
> On 2026/05/05 17:45, Timofei Zhakov wrote:
> > On Tue, May 5, 2026 at 1:38 AM Jun Omae <[email protected]> wrote:
> >>
> >> On 2026/05/05 0:09, [email protected] wrote:
> >>> Author: rinrab
> >>> Date: Mon May  4 15:09:48 2026
> >>> New Revision: 1933812
> >>>
> >>> Log:
> >>> cmake: Import targets.cmake before processing dependencies; This would 
> >>> allow
> >>> potentially refering to those targets in dependency search. Although cmake
> >>> allows to link a non-existing target, the target that it is linked to has 
> >>> to be
> >>> declared before.
> >>>
> >>> * CMakeLists.txt
> >>>   (target_exports, ra-libs, fs-libs, the-include): Move them up.
> >>>
> >>> Modified:
> >>>    subversion/trunk/CMakeLists.txt
> >> After r1933812, cmake is failing with SVN_ENABLE_SWIG_* options.
> >>
> >> [[[
> >> CMake Error at build/cmake/targets.cmake:2626 (swig_add_library):
> >>   Unknown CMake command "swig_add_library".
> >> Call Stack (most recent call first):
> >>   CMakeLists.txt:290 (include)
> >> ]]]
> >
> > Oopsie, should be fixed in r1933842.
>
>
> Thanks. However, builds of *.i files are failing....

Ohphf, I'm stupid, sorry. Something didn't quite recompile for me.

> [[[
> cd /home/jun66j5/src/subversion.git/out && /usr/bin/cmake -E make_directory 
> /home/jun66j5/src/subversion.git/out/CMakeFiles/python_delta.dir 
> /home/jun66j5/src/subversion.git/out/PythonPackages/libsvn 
> /home/jun66j5/src/subversion.git/out/PythonPackages/libsvn && /usr/bin/cmake 
> -E env SWIG_LIB= /home/jun66j5/swig/4.4.1/bin/swig -python -nofastunpack 
> -outdir /home/jun66j5/src/subversion.git/out/PythonPackages/libsvn -interface 
> _delta -o 
> /home/jun66j5/src/subversion.git/out/PythonPackages/libsvn/svn_deltaPYTHON_wrap.c
>  /home/jun66j5/src/subversion.git/subversion/bindings/swig/svn_delta.i
> /home/jun66j5/src/subversion.git/subversion/bindings/swig/svn_delta.i:24: 
> Error: Unable to find 'svn_global.swg'
> /home/jun66j5/src/subversion.git/subversion/bindings/swig/core.i:26: Error: 
> Unable to find 'svn_global.swg'
> /home/jun66j5/src/subversion.git/subversion/bindings/swig/core.i:827: Error: 
> Unable to find 'svn_error_codes_h.swg'
> /home/jun66j5/src/subversion.git/subversion/bindings/swig/core.i:828: Error: 
> Unable to find 'svn_time_h.swg'
> ...
> ]]]
>
> The SWIG_INCLUDE_DIRECTORIES variable is used from targets.cmake
> but it appears that the variable is modified after include(targets.cmake).
>
> Ad hoc patch:
>
> [[[
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index c161b7030..0ba7d260e 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -231,6 +231,14 @@ endif()
>
>  if (SVN_ENABLE_SWIG_PERL OR SVN_ENABLE_SWIG_PYTHON OR SVN_ENABLE_SWIG_RUBY)
>    include(UseSWIG)
> +  set(SWIG_INCLUDE_DIRECTORIES
> +    ${CMAKE_CURRENT_SOURCE_DIR}/subversion/bindings/swig/include
> +    ${CMAKE_CURRENT_SOURCE_DIR}/subversion/bindings/swig
> +    ${CMAKE_CURRENT_SOURCE_DIR}/subversion/include
> +
> +    ${CMAKE_CURRENT_BINARY_DIR}/subversion/bindings/swig/proxy
> +    ${CMAKE_CURRENT_BINARY_DIR}
> +  )
>  endif()
>
>  # Setup modules path
> @@ -559,15 +567,6 @@ if(SVN_ENABLE_SWIG_PERL OR SVN_ENABLE_SWIG_PYTHON OR 
> SVN_ENABLE_SWIG_RUBY)
>
>    file(MAKE_DIRECTORY 
> "${CMAKE_CURRENT_BINARY_DIR}/subversion/bindings/swig/proxy")
>
> -  set(SWIG_INCLUDE_DIRECTORIES
> -    ${CMAKE_CURRENT_SOURCE_DIR}/subversion/bindings/swig/include
> -    ${CMAKE_CURRENT_SOURCE_DIR}/subversion/bindings/swig
> -    ${CMAKE_CURRENT_SOURCE_DIR}/subversion/include
> -
> -    ${CMAKE_CURRENT_BINARY_DIR}/subversion/bindings/swig/proxy
> -    ${CMAKE_CURRENT_BINARY_DIR}
> -  )
> -
>    add_library(external-swig INTERFACE)
>
>    file(GLOB swig_headers_input 
> "${CMAKE_CURRENT_SOURCE_DIR}/subversion/include/*.h")
> ]]]
>

Of course. This patch solves the problem.

Do you want to go ahead and commit it or I can do so if you want?

-- 
Timofei Zhakov

Reply via email to