add bit size to config object
This commit is contained in:
parent
15308931e9
commit
129a846393
1
.gitignore
vendored
1
.gitignore
vendored
@ -36,6 +36,7 @@ Thumbs.db
|
||||
# build related files #
|
||||
#######################
|
||||
/build/
|
||||
/Util/UUID.config.h
|
||||
|
||||
# Eclipse related files #
|
||||
#########################
|
||||
|
@ -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)
|
||||
|
@ -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() {
|
||||
|
@ -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 */
|
Loading…
Reference in New Issue
Block a user