diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d96a2f377..9fe359b274 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Build: - FIXED: Update Node.js binding path from `lib/binding` to `lib/binding_napi_v8` to match node-pre-gyp versioning conventions [#7272](https://github.com/Project-OSRM/osrm-backend/pull/7272) - FIXED: Reduce MSVC compiler warnings by suppressing informational warnings while preserving bug-indicating warnings [#7253](https://github.com/Project-OSRM/osrm-backend/issues/7253) + - FIXED: Merge `osrm_extract` and `osrm_guidance` to avoid circular dependencies. [#7315](https://github.com/Project-OSRM/osrm-backend/pull/7315) - FIXED: Work around compilation error due to a false-positive of array-bounds check in sol2 [#7317](https://github.com/Project-OSRM/osrm-backend/pull/7317) - Misc: - ADDED: `SHM_LOCK_DIR` environment variable for shared memory lock file directory [#7312](https://github.com/Project-OSRM/osrm-backend/pull/7312) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1967feaa8..5ca697969f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,8 +160,9 @@ file(GLOB ServerGlob src/server/*.cpp src/server/**/*.cpp) file(GLOB EngineGlob src/engine/*.cpp src/engine/**/*.cpp) add_library(UTIL OBJECT ${UtilGlob}) -add_library(EXTRACTOR OBJECT ${ExtractorGlob}) -add_library(GUIDANCE OBJECT ${GuidanceGlob}) +# For historical reason the guidance and extract code are separate. +# They are so entangled though (circular dependencies) that separate libraries are not feasible. +add_library(EXTRACTOR OBJECT ${ExtractorGlob} ${GuidanceGlob}) add_library(PARTITIONER OBJECT ${PartitionerGlob}) add_library(CUSTOMIZER OBJECT ${CustomizerGlob}) add_library(CONTRACTOR OBJECT ${ContractorGlob}) @@ -181,7 +182,6 @@ add_executable(osrm-datastore src/tools/store.cpp $ $ $ $ $) add_library(osrm_contract src/osrm/contractor.cpp $ $) add_library(osrm_extract src/osrm/extractor.cpp $ $ $) -add_library(osrm_guidance $ $) add_library(osrm_partition src/osrm/partitioner.cpp $ $ $) add_library(osrm_customize src/osrm/customizer.cpp $ $ $) add_library(osrm_update $ $ $) @@ -483,12 +483,6 @@ set(EXTRACTOR_LIBRARIES ${TBB_LIBRARIES} ${ZLIB_LIBRARY} ${MAYBE_COVERAGE_LIBRARIES}) -set(GUIDANCE_LIBRARIES - ${BOOST_BASE_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} - ${LUA_LIBRARIES} - ${TBB_LIBRARIES} - ${MAYBE_COVERAGE_LIBRARIES}) set(PARTITIONER_LIBRARIES ${BOOST_ENGINE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} @@ -540,7 +534,7 @@ set(UTIL_LIBRARIES target_link_libraries(osrm ${ENGINE_LIBRARIES}) target_link_libraries(osrm_update ${UPDATER_LIBRARIES}) target_link_libraries(osrm_contract ${CONTRACTOR_LIBRARIES} osrm_update osrm_store) -target_link_libraries(osrm_extract osrm_guidance ${EXTRACTOR_LIBRARIES}) +target_link_libraries(osrm_extract ${EXTRACTOR_LIBRARIES}) target_link_libraries(osrm_partition ${PARTITIONER_LIBRARIES}) target_link_libraries(osrm_customize ${CUSTOMIZER_LIBRARIES} osrm_update osrm_store) target_link_libraries(osrm_store ${STORAGE_LIBRARIES}) @@ -607,7 +601,6 @@ install(TARGETS osrm_customize DESTINATION lib) install(TARGETS osrm_update DESTINATION lib) install(TARGETS osrm_contract DESTINATION lib) install(TARGETS osrm_store DESTINATION lib) -install(TARGETS osrm_guidance DESTINATION lib) # Install profiles and support library to /usr/local/share/osrm/profiles by default set(DefaultProfilesDir profiles) diff --git a/unit_tests/CMakeLists.txt b/unit_tests/CMakeLists.txt index c3cd7b09c4..ac5f6b2b7e 100644 --- a/unit_tests/CMakeLists.txt +++ b/unit_tests/CMakeLists.txt @@ -160,12 +160,12 @@ target_include_directories(contractor-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(storage-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(engine-tests ${ENGINE_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) -target_link_libraries(extractor-tests osrm_extract osrm_guidance ${EXTRACTOR_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(extractor-tests osrm_extract ${EXTRACTOR_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) target_link_libraries(partitioner-tests osrm_partition ${PARTITIONER_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) target_link_libraries(customizer-tests osrm_customize ${CUSTOMIZER_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) target_link_libraries(updater-tests osrm_update ${UPDATER_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) target_link_libraries(library-tests osrm ${ENGINE_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) -target_link_libraries(library-extract-tests osrm_extract osrm_guidance ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(library-extract-tests osrm_extract ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) target_link_libraries(library-contract-tests osrm_contract ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) target_link_libraries(library-customize-tests osrm_customize ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) target_link_libraries(library-partition-tests osrm_partition ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})