From 17dcb7a28131eae0113f00c744c19087f5f69d3b Mon Sep 17 00:00:00 2001 From: Michael Bell Date: Tue, 25 May 2021 21:54:31 +0100 Subject: [PATCH] Include -D_GLIBCXX_USE_CXX11_ABI=0 in pkg-config flags Ensure that any program using libosrm as a dependency builds against the same libstdc++ ABI. This is needed as Mason dependencies are still built against the old ABI. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9aeb1c4b7..265d27d64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -514,7 +514,7 @@ if(ENABLE_MASON) set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${LINKER_FLAGS}") # current mason packages target -D_GLIBCXX_USE_CXX11_ABI=0 - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0") + add_dependency_defines(-D_GLIBCXX_USE_CXX11_ABI=0) # note: we avoid calling find_package(Osmium ...) here to ensure that the # expat and bzip2 are used from mason rather than the system