From f5f7269f7004a9314827e84f24d51e1accdb7ec3 Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Fri, 19 Jul 2013 14:38:12 +0200 Subject: [PATCH] Trigger rebuild of fingerprint everytime --- .gitignore | 2 +- CMakeLists.txt | 27 ++++++++++++++++----------- Util/UUID.h | 12 ++++++++++-- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 6516e9005..dbee9e07a 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,7 @@ Thumbs.db # build related files # ####################### /build/ -/Util/UUID.config.h +/Util/UUID.cpp # Eclipse related files # ######################### diff --git a/CMakeLists.txt b/CMakeLists.txt index 32896c0f6..4c70ad560 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,18 +11,21 @@ else(IS_64_SYSTEM) set( HAS64BITS 0 ) endif(IS_64_SYSTEM) -file(MD5 ${CMAKE_SOURCE_DIR}/createHierarchy.cpp MD5PREPARE) -file(MD5 ${CMAKE_SOURCE_DIR}/DataStructures/StaticRTree.h MD5RTREE) -file(MD5 ${CMAKE_SOURCE_DIR}/DataStructures/NodeInformationHelpDesk.h MD5NODEINFO) -file(MD5 ${CMAKE_SOURCE_DIR}/Util/GraphLoader.h MD5GRAPH) -file(MD5 ${CMAKE_SOURCE_DIR}/Server/DataStructures/QueryObjectsStorage.cpp MD5OBJECTS) - -CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/Util/UUID.config.h.in ${CMAKE_SOURCE_DIR}/Util/UUID.config.h ) - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) -set(BOOST_COMPONENTS filesystem regex system thread) -#add_library(uuid OBJECT Util/UUID.cpp) +add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/Util/UUID.config.h + COMMAND ${CMAKE_COMMAND} -P + ${CMAKE_SOURCE_DIR}/cmake/UUID-Config.cmake + DEPENDS + ${CMAKE_SOURCE_DIR}/cmake/UUID-Config.cmake + ${CMAKE_SOURCE_DIR}/Util/UUID.config.h.in + COMMENT "Configuring UUID.config.h" + VERBATIM) + +add_custom_target(UUIDConfigure ALL + DEPENDS ${CMAKE_SOURCE_DIR}/Util/UUID.config.h ${CMAKE_SOURCE_DIR}/Util/GraphLoader.h) + +set(BOOST_COMPONENTS filesystem regex system thread) file(GLOB ExtractorGlob Extractor/*.cpp) set(ExtractorSources extractor.cpp ${ExtractorGlob}) @@ -42,6 +45,8 @@ file(GLOB ServerStructureGlob Server/DataStructures/*.cpp) set(OSRMSources ${LibOSRMGlob} ${DescriptorGlob} ${SearchEngineSource} ${ServerStructureGlob}) add_library(OSRM SHARED ${OSRMSources}) +add_library(UUID STATIC Util/UUID.cpp) +add_dependencies( UUID UUIDConfigure ) # Check the release mode if(NOT CMAKE_BUILD_TYPE MATCHES Debug) @@ -83,7 +88,7 @@ endif (NOT Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) target_link_libraries( OSRM ${Boost_LIBRARIES} ) -target_link_libraries( osrm-extract ${Boost_LIBRARIES} ) +target_link_libraries( osrm-extract ${Boost_LIBRARIES} UUID ) target_link_libraries( osrm-prepare ${Boost_LIBRARIES} ) target_link_libraries( osrm-routed ${Boost_LIBRARIES} OSRM ) diff --git a/Util/UUID.h b/Util/UUID.h index 29689f4a1..5dfce34cf 100644 --- a/Util/UUID.h +++ b/Util/UUID.h @@ -21,13 +21,14 @@ or see http://www.gnu.org/licenses/agpl.txt. #ifndef UUID_H #define UUID_H -#include "UUID.config.h" - #include #include // uuid class #include // generators #include // streaming operators etc. +#include + +#include #include #include @@ -42,6 +43,13 @@ public: const boost::uuids::uuid & GetUUID() const; private: UUID(); + const unsigned magic_number; + char md5_prepare[33]; + char md5_tree[33]; + char md5_nodeinfo[33]; + char md5_graph[33]; + char md5_objects[33]; + // initialize to {6ba7b810-9dad-11d1-80b4-00c04fd430c8} boost::uuids::uuid named_uuid; bool has_64_bits;