Trying to build with CMake, but dependency is not maitained with add_subdirectory
- 主要语言
- HTML
- 星标
- 8.6k
- 派生
- 1.9k
- 平均合并
- 39 分钟
- 30 天内合并 PR
- 2
描述
Hi,
I was trying to build boost with cmake, but I had several errors of the form:
```
CMake Error at libs/date_time/CMakeLists.txt:10 (add_library):
Target "boost_date_time" links to target "Boost::tuple" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at libs/date_time/CMakeLists.txt:10 (add_library):
Target "boost_date_time" links to target "Boost::function" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
```
Looking at BoostRoot.cmake it seems the for loop at line 224:
```
foreach(__boost_lib_cml IN LISTS __boost_libraries)
...
add_subdirectory(libs/${__boost_lib})
__boost_auto_install(${__boost_lib})
...
endif()
```
does not care about the order of dependencies while doing add_subdirectory. Wouldn't the correct order of add_subdirectory be in accordance with the order in which ${__boost_include_libraries} are listed instead of alphabetical order ?
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。