intel / intel/cpp-std-extensions

CPM usage conflicts if Boost is already included

未關閉
#353 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C++
星號
127
分支
18
平均合併
11 小時 45 分鐘
30 天內合併 PR
13

描述

If Boost has been added via CPM via something like:

```
add_versioned_package(
NAME Boost
VERSION 1.88.0
GITHUB_REPOSITORY "boostorg/boost"
GIT_TAG "boost-1.88.0"
)
```

then there is an error:

```
CMake Error at /path/to/cpm_cache/mp11/bf7aae5c18316ffffb3d7e62dc3f8423b7c968b1/CMakeLists.txt:9 (add_library):
add_library cannot create target "boost_mp11" because another target with
the same name already exists. The existing target is an interface library
```

貢獻指南

開啟貢獻指南

研究方向

Reproduce the conflict with the shown CPM add_versioned_package example and inspect the generated CMakeLists.txt where the duplicate boost_mp11 target is defined. Confirm the Boost package can already be present without a second target definition; done means the CPM setup configures without the add_library duplicate-target error.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cmake, cpp
領域
build-system
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。