From 129a846393766d589fe54694fc4e9de566a6e0ce Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Wed, 17 Jul 2013 15:27:38 +0200 Subject: [PATCH] add bit size to config object --- .gitignore | 1 + CMakeLists.txt | 7 +++++-- Util/UUID.cpp | 2 ++ Util/UUID.h | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a3aefbf70..6516e9005 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ Thumbs.db # build related files # ####################### /build/ +/Util/UUID.config.h # Eclipse related files # ######################### diff --git a/CMakeLists.txt b/CMakeLists.txt index 91e7a6774..a4d7fd34d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,9 +5,12 @@ include(FindPackageHandleStandardArgs) TRY_RUN(SHARED_LIBRARY_PATH_TYPE SHARED_LIBRARY_PATH_INFO_COMPILED ${PROJECT_BINARY_DIR}/CMakeTmp ${PROJECT_SOURCE_DIR}/cmake/size.cpp OUTPUT_VARIABLE IS_64_SYSTEM) if(IS_64_SYSTEM) message(STATUS "System supports 64 bits.") + set( HAS64BITS 1 ) else(IS_64_SYSTEM) MESSAGE(WARNING "Compiling on a 32 bit system is unsupported!") + set( HAS64BITS 0 ) endif(IS_64_SYSTEM) +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) @@ -20,9 +23,9 @@ add_executable(osrm-extract ${ExtractorSources} $) file(GLOB PrepareGlob Contractor/*.cpp) set(PrepareSources createHierarchy.cpp ${PrepareGlob}) -add_executable(osrm-prepare ${PrepareSources}) +add_executable(osrm-prepare ${PrepareSources} $) -add_executable(osrm-routed routed.cpp) +add_executable(osrm-routed routed.cpp $) set_target_properties(osrm-routed PROPERTIES COMPILE_FLAGS -DROUTED) file(GLOB DescriptorGlob Descriptors/*.cpp) diff --git a/Util/UUID.cpp b/Util/UUID.cpp index 64a316708..322cc02b5 100644 --- a/Util/UUID.cpp +++ b/Util/UUID.cpp @@ -23,6 +23,8 @@ or see http://www.gnu.org/licenses/agpl.txt. UUID::UUID() { boost::uuids::name_generator gen(named_uuid); named_uuid = gen(std::string(__DATE__).append(__TIME__)); + + has_64_bits = HAS64BITS; } UUID::~UUID() { diff --git a/Util/UUID.h b/Util/UUID.h index c580ab514..29689f4a1 100644 --- a/Util/UUID.h +++ b/Util/UUID.h @@ -21,6 +21,8 @@ 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 @@ -42,6 +44,7 @@ private: UUID(); // initialize to {6ba7b810-9dad-11d1-80b4-00c04fd430c8} boost::uuids::uuid named_uuid; + bool has_64_bits; }; #endif /* UUID_H */ \ No newline at end of file