Some code fixes done to multicast service classes.
[tourist.git] / CMakeLists.txt
blobe3c754a65786437289a9715fc4ca0f09cfe1713f
1 PROJECT(Tourist)
3 #Versioning
4 SET(Tourist_MAJOR_Version 0)
5 SET(Tourist_MINOR_Version 1)
6 SET(Tourist_BUILD_VERSION 1)
7 SET(Tourist_VERSION
8   "${Tourist_MajorVersion}.${Tourist_MINOR_VERSION}.${Tourist_BUILD_VERSION}")
11 #Eclipse
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
20 if(DEBUG)
21   SET(CMAKE_BUILD_TYPE Debug)
22 ELSE(DEBUG)
23   SET(CMAKE_BUILD_TYPE RELEASE)
24 ENDIF(DEBUG)
26 #This to ensure that
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)
41   SET(ID_ZIE 2)
42 ENDIF("${SIZEOF_INT}" EQUAL 8)
44 IF("${SIZEOF_INT}" EQUAL 2)
45   SET(ID_ZIE 8)
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)
57 ADD_SUBDIRECTORY(Net)
58 ADD_SUBDIRECTORY(Message)
59 #ADD_SUBDIRECTORY(ReliableUDP)
60 #Should be at last, as it use all of the component list above
61 ADD_SUBDIRECTORY(App)
62 ADD_SUBDIRECTORY(client)
64 #INCLUDE(CTest)
65 #INCLUDE(Dart)
66 #ADD_TEST(SimpleTest ./Message/testsuite/testrunner_message all)