From 3f7afd47d2ca79905b8f01635c1f70a33edc2c3b Mon Sep 17 00:00:00 2001 From: "Daniel J. Hofmann" Date: Mon, 14 Sep 2015 11:50:53 +0200 Subject: [PATCH] Do not violate the One Definition Rule (ODR). By linking in the coordinate object file twice, we violate the ODR, resulting in our program to not be "well-formed" in language lawyer speak (hint: bad, very bad). (How come no one noticed this all the time, this was introduced somewhere between v4.5.0 and v4.6.0 from a quick look...) References: - C++14 standard (N3936.pfd): 3.2 One definition rule [basic.def.odr] - http://eel.is/c++draft/basic.def.odr --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7090ff2ed..ec3811788 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,7 +92,7 @@ set( ) add_library(COORDINATE OBJECT ${CoordinateGlob}) -add_library(OSRM ${OSRMSources} $ $ $ $ $ $ $ $ $ $) +add_library(OSRM ${OSRMSources} $ $ $ $ $ $ $ $ $) add_library(FINGERPRINT OBJECT util/fingerprint.cpp) add_dependencies(FINGERPRINT FingerPrintConfigure)