Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-10011

[C++] Make FindRE2.cmake re-entrant

    XMLWordPrintableJSON

Details

    Description

      Repeated calls to FindRE2.cmake try to recreate the exisiting target RE2::re2 which is prohibited by CMake and fails with the following error:

      CMake Warning (dev) at C:/Miniconda37-x64/envs/arrow/Library/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
        The package name passed to `find_package_handle_standard_args` (RE2) does
        not match the name of the calling package (re2).  This can lead to problems
        in calling code that expects `find_package` result variables (e.g.,
        `_FOUND`) to follow a certain pattern.
      Call Stack (most recent call first):
        cmake_modules/FindRE2.cmake:63 (find_package_handle_standard_args)
        C:/Miniconda37-x64/envs/arrow/Library/lib/cmake/grpc/gRPCConfig.cmake:21 (find_package)
        cmake_modules/ThirdpartyToolchain.cmake:2472 (find_package)
        CMakeLists.txt:495 (include)
      This warning is for project developers.  Use -Wno-dev to suppress it.
      CMake Error at cmake_modules/FindRE2.cmake:66 (add_library):
        add_library cannot create imported target "RE2::re2" because another target
        with the same name already exists.
      Call Stack (most recent call first):
        C:/Miniconda37-x64/envs/arrow/Library/lib/cmake/grpc/gRPCConfig.cmake:21 (find_package)
        cmake_modules/ThirdpartyToolchain.cmake:2472 (find_package)
        CMakeLists.txt:495 (include)
      

      Note that this issue only occurs currently on case-insensitive file systems when ARROW_FLIGHT=ON is set.

      Attachments

        Issue Links

          Activity

            People

              uwe Uwe Korn
              uwe Uwe Korn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m