Trying to build with CMake, but dependency is not maitained with add_subdirectory
- Dominant language
- HTML
- Stars
- 8.6k
- Forks
- 1.9k
- Avg merge
- 39m
- Merged PRs (30d)
- 2
Description
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 ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.