Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- 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)
- FIXED: Fix compilation with gcc >14 in release with LTO. [#7268](https://github.com/Project-OSRM/osrm-backend/issues/7268)
- ADDED: Conditionally prefix custom CMake targets with `osrm_` when built as subproject, and add ALIAS targets for FetchContent compatibility [#7267](https://github.com/Project-OSRM/osrm-backend/issues/7267)
- Misc:
- ADDED: `--max-header-size` to override the (automatically) configured maximum header size for osrm-routed [#7336](https://github.com/Project-OSRM/osrm-backend/pull/7336)
- CHANGED: Use boost::beast instead of own HTTP code for osrm-routed [#7328](https://github.com/Project-OSRM/osrm-backend/pull/7328)
Expand Down
36 changes: 29 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,15 @@ add_library(osrm_customize src/osrm/customizer.cpp $<TARGET_OBJECTS:CUSTOMIZER>
add_library(osrm_update $<TARGET_OBJECTS:UPDATER> $<TARGET_OBJECTS:MICROTAR> $<TARGET_OBJECTS:UTIL>)
add_library(osrm_store $<TARGET_OBJECTS:STORAGE> $<TARGET_OBJECTS:MICROTAR> $<TARGET_OBJECTS:UTIL>)

# ALIAS targets with :: provide compile-time safety: typos error at configure time, not link time
add_library(osrm::osrm ALIAS osrm)
add_library(osrm::contract ALIAS osrm_contract)
add_library(osrm::extract ALIAS osrm_extract)
add_library(osrm::partition ALIAS osrm_partition)
add_library(osrm::customize ALIAS osrm_customize)
add_library(osrm::update ALIAS osrm_update)
add_library(osrm::store ALIAS osrm_store)

# Explicitly set the build type to Release if no other type is specified
# on the command line. Without this, cmake defaults to an unoptimized,
# non-debug build, which almost nobody wants.
Expand Down Expand Up @@ -427,11 +436,19 @@ else()
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
if(BUILD_AS_SUBPROJECT)
add_custom_target(osrm_doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
else()
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif()
endif()
# note libosmium depends on expat and bzip2
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/cmake")
Expand Down Expand Up @@ -678,8 +695,13 @@ configure_file(
"${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"
IMMEDIATE @ONLY)

add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake)
if(BUILD_AS_SUBPROJECT)
add_custom_target(osrm_uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake)
else()
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake)
endif()


# Modular build system: each directory registered here provides its own CMakeLists.txt
Expand Down
20 changes: 16 additions & 4 deletions src/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,24 @@ target_link_libraries(packedvector-bench
${MAYBE_SHAPEFILE})


add_custom_target(benchmarks
if(BUILD_AS_SUBPROJECT)
add_custom_target(osrm_benchmarks
DEPENDS
rtree-bench
packedvector-bench
match-bench
route-bench
bench
route-bench
bench
json-render-bench
alias-bench)
alias-bench)
else()
add_custom_target(benchmarks
DEPENDS
rtree-bench
packedvector-bench
match-bench
route-bench
bench
json-render-bench
alias-bench)
endif()
6 changes: 5 additions & 1 deletion src/nodejs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,8 @@ list(APPEND ARTIFACTS "${BINDING_DIR}/node_osrm.node")


message(STATUS "node_osrm artifacts will be copied to: ${BINDING_DIR}")
add_custom_target(copy_artifacts ALL DEPENDS ${ARTIFACTS})
if(BUILD_AS_SUBPROJECT)
add_custom_target(osrm_copy_artifacts ALL DEPENDS ${ARTIFACTS})
else()
add_custom_target(copy_artifacts ALL DEPENDS ${ARTIFACTS})
endif()
7 changes: 6 additions & 1 deletion unit_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,10 @@ target_link_libraries(util-tests ${UTIL_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_L
target_link_libraries(contractor-tests osrm_contract ${CONTRACTOR_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_link_libraries(storage-tests osrm_store ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})

add_custom_target(tests
if(BUILD_AS_SUBPROJECT)
add_custom_target(osrm_tests
DEPENDS engine-tests extractor-tests contractor-tests partitioner-tests updater-tests customizer-tests library-tests library-extract-tests library-contract-tests library-customize-tests library-partition-tests server-tests util-tests storage-tests)
else()
add_custom_target(tests
DEPENDS engine-tests extractor-tests contractor-tests partitioner-tests updater-tests customizer-tests library-tests library-extract-tests library-contract-tests library-customize-tests library-partition-tests server-tests util-tests storage-tests)
endif()
Loading