-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Unusable for installable projects whose other dependencies also define a check
target
#1641
Comments
Steps to reproduce the problem is not filled in. Please do so. You also say that this is relevant to any version of CMake older than 2.6.0. I just want to confirm that this is correct as our minimum supported CMake version is 3.13. Does this work still not work with a supported CMake version? |
Clone this project to add_custom_target(check)
add_subdirectory(abseil-cpp) Create an empty folder,
|
Stumbled upon a similar problem too, but this time when trying to use crc32c along with abseil. When
|
I also encountered this in nghttp2/nghttp2#2204 |
Describe the issue
I am working on a project that depends on LLVM. LLVM uses installable targets (using CMake's
install
command), which forces my project to do the same. If I want to useabseil-cpp
or any project that depends on it, I thus need to setABSL_ENABLE_INSTALL=ON
.Furthermore, LLVM also defines a
check
target in its CMake files. This clashes with thecheck
target of Abseil.This only happens with
ABSL_ENABLE_INSTALL=ON
. Otherwise, the target names are prefixed withabsl_
, see the definition ofabsl_cc_library
.Steps to reproduce the problem
What version of Abseil are you using?
Any version from about four years ago until today.
What operating system and version are you using?
Any.
What compiler and version are you using?
Any.
What build system are you using?
Any version of CMake older than 2.6.0.
Additional context
Of course, the clash is also due to to LLVM using a non-prefixed target name. However, I'd argue that this doesn't absolve
abseil-cpp
from being well-behaved and prefix it's target names as an effort to keep them unique no matter what other project it is used with.The text was updated successfully, but these errors were encountered: