add bit size to config object

This commit is contained in:
DennisOSRM 2013-07-17 15:27:38 +02:00
parent 15308931e9
commit 129a846393
4 changed files with 11 additions and 2 deletions

1
.gitignore vendored
View File

@ -36,6 +36,7 @@ Thumbs.db
# build related files #
#######################
/build/
/Util/UUID.config.h
# Eclipse related files #
#########################

View File

@ -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} $<TARGET_OBJECTS:uuid>)
file(GLOB PrepareGlob Contractor/*.cpp)
set(PrepareSources createHierarchy.cpp ${PrepareGlob})
add_executable(osrm-prepare ${PrepareSources})
add_executable(osrm-prepare ${PrepareSources} $<TARGET_OBJECTS:uuid>)
add_executable(osrm-routed routed.cpp)
add_executable(osrm-routed routed.cpp $<TARGET_OBJECTS:uuid>)
set_target_properties(osrm-routed PROPERTIES COMPILE_FLAGS -DROUTED)
file(GLOB DescriptorGlob Descriptors/*.cpp)

View File

@ -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() {

View File

@ -21,6 +21,8 @@ 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
@ -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 */