4 SET(Tourist_MAJOR_Version 0)
5 SET(Tourist_MINOR_Version 1)
6 SET(Tourist_BUILD_VERSION 1)
8 "${Tourist_MajorVersion}.${Tourist_MINOR_VERSION}.${Tourist_BUILD_VERSION}")
12 IF(CMAKE_COMPILER_IS_GNUCC)
13 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
14 ENDIF(CMAKE_COMPILER_IS_GNUCC)
15 IF(CMAKE_COMPILER_IS_GNUCXX)
16 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
17 ENDIF(CMAKE_COMPILER_IS_GNUCXX)
19 #To enable debug output
21 SET(CMAKE_BUILD_TYPE Debug)
23 SET(CMAKE_BUILD_TYPE RELEASE)
27 SET(PROJECT_ROOT ${Tourist_SOURCE_DIR})
29 #Checking size of data types.
30 INCLUDE(${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
31 INCLUDE(${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityC.cmake)
33 #It will set the SIZEOF_INT.
34 SET(SIZEOF_INT ${CMAKE_SIZEOF_INT})
35 SET(SIZEOF_UNSIGNED_INT ${CMAKE_SIZEOF_INT})
37 MATH(EXPR MAX_LEVEL ${SIZEOF_INT}*8)
38 SET(ID_SIZE ${SIZEOF_INT})
40 IF("${SIZEOF_INT}" EQUAL 8)
42 ENDIF("${SIZEOF_INT}" EQUAL 8)
44 IF("${SIZEOF_INT}" EQUAL 2)
46 ENDIF("${SIZEOF_INT}" EQUAL 2)
48 #Copy the Configure.h.in to the desired directory and replace the @..@ macros
49 #with the variables we defined in this build script.
50 CONFIGURE_FILE(Constants.h.in ${PROJECT_ROOT}/Core/include/Tourist/Constants.h @ONLY IMMEDIATE)
51 CONFIGURE_FILE(logger.properties ${Tourist_BINARY_DIR}/logger.properties COPYONLY)
52 CONFIGURE_FILE(node.properties ${Tourist_BINARY_DIR}/node.properties COPYONLY)
54 ADD_SUBDIRECTORY(Hessian)
55 ADD_SUBDIRECTORY(Core)
56 ADD_SUBDIRECTORY(Util)
58 ADD_SUBDIRECTORY(Message)
59 #ADD_SUBDIRECTORY(ReliableUDP)
60 #Should be at last, as it use all of the component list above
62 ADD_SUBDIRECTORY(client)
66 #ADD_TEST(SimpleTest ./Message/testsuite/testrunner_message all)