Trying to build with CMake, but dependency is not maitained with add_subdirectory
- Langage dominant
- HTML
- Étoiles
- 8.6k
- Forks
- 1.9k
- Merge moyen
- 39 min
- PR mergées (30 j)
- 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 ?
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.