Skip to content

Commit

Permalink
Trigger rebuild of fingerprint everytime
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisOSRM committed Jul 19, 2013
1 parent 03f1430 commit f5f7269
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Thumbs.db
# build related files #
#######################
/build/
/Util/UUID.config.h
/Util/UUID.cpp

# Eclipse related files #
#########################
Expand Down
25 changes: 15 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/Util/UUID.config.h.in ${CMAKE_SOURCE_DIR}/Util/UUID.config.h )
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)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(BOOST_COMPONENTS filesystem regex system thread)
add_custom_target(UUIDConfigure ALL
DEPENDS ${CMAKE_SOURCE_DIR}/Util/UUID.config.h ${CMAKE_SOURCE_DIR}/Util/GraphLoader.h)

#add_library(uuid OBJECT Util/UUID.cpp)
set(BOOST_COMPONENTS filesystem regex system thread)

file(GLOB ExtractorGlob Extractor/*.cpp)
set(ExtractorSources extractor.cpp ${ExtractorGlob})
Expand All @@ -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)
Expand Down Expand Up @@ -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 )

Expand Down
12 changes: 10 additions & 2 deletions Util/UUID.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ or see http://www.gnu.org/licenses/agpl.txt.
#ifndef UUID_H
#define UUID_H

#include "UUID.config.h"

#include <boost/noncopyable.hpp>
#include <boost/uuid/uuid.hpp> // uuid class
#include <boost/uuid/uuid_generators.hpp> // generators
#include <boost/uuid/uuid_io.hpp> // streaming operators etc.

#include <cstring>

#include <algorithm>
#include <iostream>
#include <string>

Expand All @@ -42,6 +43,13 @@ class UUID : boost::noncopyable {
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;
Expand Down

0 comments on commit f5f7269

Please sign in to comment.