Modularize benchmarks subproject
This commit is contained in:
parent
b1ed268d0e
commit
a516245c94
@ -46,8 +46,6 @@ add_custom_target(FingerPrintConfigure ALL ${CMAKE_COMMAND}
|
|||||||
COMMENT "Configuring revision fingerprint"
|
COMMENT "Configuring revision fingerprint"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
|
|
||||||
add_custom_target(benchmarks DEPENDS rtree-bench)
|
|
||||||
|
|
||||||
set(BOOST_COMPONENTS date_time filesystem iostreams program_options regex system thread)
|
set(BOOST_COMPONENTS date_time filesystem iostreams program_options regex system thread)
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
@ -80,9 +78,6 @@ add_library(osrm_extract $<TARGET_OBJECTS:EXTRACTOR> $<TARGET_OBJECTS:UTIL>)
|
|||||||
add_library(osrm_contract $<TARGET_OBJECTS:CONTRACTOR> $<TARGET_OBJECTS:UTIL>)
|
add_library(osrm_contract $<TARGET_OBJECTS:CONTRACTOR> $<TARGET_OBJECTS:UTIL>)
|
||||||
add_library(osrm_store $<TARGET_OBJECTS:STORAGE> $<TARGET_OBJECTS:UTIL>)
|
add_library(osrm_store $<TARGET_OBJECTS:STORAGE> $<TARGET_OBJECTS:UTIL>)
|
||||||
|
|
||||||
# Benchmarks
|
|
||||||
add_executable(rtree-bench EXCLUDE_FROM_ALL src/benchmarks/static_rtree.cpp $<TARGET_OBJECTS:UTIL>)
|
|
||||||
|
|
||||||
# Check the release mode
|
# Check the release mode
|
||||||
if(NOT CMAKE_BUILD_TYPE MATCHES Debug)
|
if(NOT CMAKE_BUILD_TYPE MATCHES Debug)
|
||||||
set(CMAKE_BUILD_TYPE Release)
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
@ -317,8 +312,6 @@ target_link_libraries(osrm ${ENGINE_LIBRARIES})
|
|||||||
target_link_libraries(osrm_contract ${CONTRACTOR_LIBRARIES})
|
target_link_libraries(osrm_contract ${CONTRACTOR_LIBRARIES})
|
||||||
target_link_libraries(osrm_extract ${EXTRACTOR_LIBRARIES})
|
target_link_libraries(osrm_extract ${EXTRACTOR_LIBRARIES})
|
||||||
target_link_libraries(osrm_store ${STORAGE_LIBRARIES})
|
target_link_libraries(osrm_store ${STORAGE_LIBRARIES})
|
||||||
# Benchmarks
|
|
||||||
target_link_libraries(rtree-bench ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${TBB_LIBRARIES})
|
|
||||||
|
|
||||||
if(BUILD_COMPONENTS)
|
if(BUILD_COMPONENTS)
|
||||||
find_package(GDAL)
|
find_package(GDAL)
|
||||||
@ -439,3 +432,4 @@ add_custom_target(uninstall
|
|||||||
|
|
||||||
# Modular build system: each directory registered here provides its own CMakeLists.txt
|
# Modular build system: each directory registered here provides its own CMakeLists.txt
|
||||||
add_subdirectory(unit_tests)
|
add_subdirectory(unit_tests)
|
||||||
|
add_subdirectory(src/benchmarks)
|
||||||
|
20
src/benchmarks/CMakeLists.txt
Normal file
20
src/benchmarks/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
file(GLOB RTreeBenchmarkSources
|
||||||
|
*.cpp)
|
||||||
|
|
||||||
|
add_executable(rtree-bench
|
||||||
|
EXCLUDE_FROM_ALL
|
||||||
|
${RTreeBenchmarkSources}
|
||||||
|
$<TARGET_OBJECTS:UTIL>)
|
||||||
|
|
||||||
|
target_include_directories(rtree-bench
|
||||||
|
PUBLIC
|
||||||
|
${PROJECT_SOURCE_DIR}/unit_tests)
|
||||||
|
|
||||||
|
target_link_libraries(rtree-bench
|
||||||
|
${Boost_LIBRARIES}
|
||||||
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
|
${TBB_LIBRARIES})
|
||||||
|
|
||||||
|
add_custom_target(benchmarks
|
||||||
|
DEPENDS
|
||||||
|
rtree-bench)
|
Loading…
Reference in New Issue
Block a user