From 53382d7eb63ded4125cd6c1edfe3f9bc0a76a488 Mon Sep 17 00:00:00 2001 From: Michael Bell <moke.byll@gmail.com> 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 89b5775a18..1cc5b48a8d 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