You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
note: same behaviour with the last abseil-cpp release
we got:
$ cmake -S. -Bbuild
-- The CXX compiler identification is GNU 13.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17 - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- pybind11 v2.12.0 dev1
-- Found Python: /usr/bin/python3.11 (found suitable version "3.11.6", minimum required is "3.6") found components: Interpreter Development.Module Development.Embed
CMake Error at pybind11_abseil/CMakeLists.txt:153 (add_library):
add_library cannot create target "status" because another target with the
same name already exists. The existing target is a static library created
insource directory
"/usr/local/google/home/corentinl/work/pybind11_abseil/build/_deps/abseil-cpp-src/absl/status".
See documentation for policy CMP0002 for more details.
CMake Error at pybind11_abseil/CMakeLists.txt:160 (target_link_libraries):
Attempt to add link library "status_pyinit_google3" to target "status"
which is not built in this directory.
This is allowed only when policy CMP0079 is set to NEW.
-- Configuring incomplete, errors occurred!
add_library(pybind11_abseil::import_status_module ALIAS import_status_module)
target_include_directories(import_status_module
INTERFACE $<BUILD_INTERFACE:${TOP_LEVEL_DIR}>)
target_link_libraries(import_status_module PUBLIC status)
The problem is that cmake TARGET names are not scoped thus the name clash, on my way to provide a patch in google/or-tools then a PR here...
would go for
# change logical target nameadd_library(status_py_extension_stub SHARED status_py_extension_stub.cc)
# but keep the previous base name, "status" for the output file...set_target_properties(status_py_extension_stub PROPERTIES LIBRARY_OUTPUT_NAME "status")
# we can keep the ALIAS unchanged to pybind11_abseil::statusadd_library(pybind11_abseil::status ALIAS status_py_extension_stub)
The text was updated successfully, but these errors were encountered:
If a super build project use
set(ABSL_ENABLE_INSTALL ON)
or modify the pybind11_abseil CMakelists.txt as fallownote: same behaviour with the last abseil-cpp release
we got:
The code:
pybind11_abseil/pybind11_abseil/CMakeLists.txt
Lines 151 to 170 in 52f2739
The problem is that cmake TARGET names are not scoped thus the name clash, on my way to provide a patch in google/or-tools then a PR here...
would go for
The text was updated successfully, but these errors were encountered: