abseil / abseil/abseil-cpp

[Bug]: Unusable for installable projects whose other dependencies also define a `check` target

オープン
#1,641 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
18.1k
フォーク
3.2k
平均マージ
20時間 36分
マージ済み PR(30日)
1

説明

### 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 use `abseil-cpp` or any project that depends on it, I thus need to set `ABSL_ENABLE_INSTALL=ON`.

Furthermore, LLVM also defines a `check` target in its CMake files. This clashes with the `check` target of Abseil.

This only happens with `ABSL_ENABLE_INSTALL=ON`. Otherwise, the target names are prefixed with `absl_`, see the [definition of `absl_cc_library`](https://github.com/abseil/abseil-cpp/blob/16e2195/CMake/AbseilHelpers.cmake#L98-L102).

### 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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。