1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 00:22:13 +00:00
nixpkgs/pkgs/servers/osrm-backend/4.5.0-openmp.patch

19 lines
595 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b6a40f9..87ca301 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -261,9 +261,10 @@ target_link_libraries(OSRM ${STXXL_LIBRARY})
target_link_libraries(osrm-extract ${STXXL_LIBRARY})
target_link_libraries(osrm-prepare ${STXXL_LIBRARY})
-if(MINGW)
- # STXXL needs OpenMP library
- target_link_libraries(osrm-extract gomp)
+find_package(OpenMP)
+if (OPENMP_FOUND)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
find_package( OSMPBF REQUIRED )