~roger-booth/mysql-proxy/laminator

« back to all changes in this revision

Viewing changes to tests/unit/CMakeLists.txt

  • Committer: Kay Roepke
  • Date: 2009-07-03 12:29:52 UTC
  • Revision ID: kay@sun.com-20090703122952-jl40zju0c8h0xj5p
add back all CMakeLists. untested on windows yet, but works on OS X

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
ADD_SUBDIRECTORY(lua)
 
2
 
 
3
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/)
 
4
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}) # for config.h
 
5
 
 
6
INCLUDE_DIRECTORIES(${GLIB_INCLUDE_DIRS})
 
7
INCLUDE_DIRECTORIES(${MYSQL_INCLUDE_DIRS})
 
8
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIRS})
 
9
INCLUDE_DIRECTORIES(${EVENT_INCLUDE_DIRS})
 
10
 
 
11
LINK_DIRECTORIES(${MYSQL_LIBRARY_DIRS})
 
12
LINK_DIRECTORIES(${LUA_LIBRARY_DIRS})
 
13
LINK_DIRECTORIES(${GLIB_LIBRARY_DIRS})
 
14
LINK_DIRECTORIES(${EVENT_LIBRARY_DIRS})
 
15
 
 
16
## tests for the chassis
 
17
 
 
18
ADD_EXECUTABLE(check_chassis_log
 
19
        check_chassis_log.c 
 
20
)
 
21
TARGET_LINK_LIBRARIES(check_chassis_log 
 
22
        mysql-chassis
 
23
        ${GLIB_LIBRARIES}
 
24
        ${GTHREAD_LIBRARIES}
 
25
        ${GMODULE_LIBRARIES} 
 
26
)
 
27
ADD_EXECUTABLE(check_plugin
 
28
        check_plugin.c 
 
29
        ../../src/chassis-plugin.c
 
30
)
 
31
TARGET_LINK_LIBRARIES(check_plugin 
 
32
        ${GLIB_LIBRARIES}
 
33
        ${GTHREAD_LIBRARIES}
 
34
        ${GMODULE_LIBRARIES}
 
35
)
 
36
ADD_EXECUTABLE(check_mysqld_proto 
 
37
        check_mysqld_proto.c 
 
38
        ../../src/glib-ext.c
 
39
        ../../src/network-mysqld-proto.c
 
40
        ../../src/network-mysqld-binlog.c
 
41
)
 
42
TARGET_LINK_LIBRARIES(check_mysqld_proto
 
43
        ${GLIB_LIBRARIES}
 
44
)
 
45
 
 
46
## this test needs a existing sql-tokenizer.c ... 
 
47
## it depends on the build-order if that is already generated
 
48
## or not
 
49
#ADD_EXECUTABLE(check_sql_tokenizer
 
50
#       check_sql_tokenizer.c 
 
51
#       ../../build-src/sql-tokenizer.c
 
52
#       )
 
53
 
 
54
#TARGET_LINK_LIBRARIES(check_sql_tokenizer
 
55
#       ${GLIB_LIBRARIES}
 
56
#)
 
57
 
 
58
ADD_EXECUTABLE(check_loadscript
 
59
        check_loadscript.c 
 
60
        ../../src/lua-scope.c 
 
61
        ../../src/lua-load-factory.c
 
62
        ../../src/chassis-stats.c 
 
63
)
 
64
 
 
65
TARGET_LINK_LIBRARIES(check_loadscript
 
66
        ${GLIB_LIBRARIES}
 
67
        ${GTHREAD_LIBRARIES}
 
68
        ${LUA_LIBRARIES}
 
69
)
 
70
 
 
71
 
 
72
ADD_EXECUTABLE(check_chassis_path
 
73
        check_chassis_path.c 
 
74
        ../../src/chassis-log.c 
 
75
        ../../src/chassis-mainloop.c 
 
76
        ../../src/chassis-plugin.c
 
77
        ../../src/chassis-stats.c 
 
78
        ../../src/chassis-path.c
 
79
)
 
80
 
 
81
TARGET_LINK_LIBRARIES(check_chassis_path
 
82
        ${GLIB_LIBRARIES}
 
83
        ${GTHREAD_LIBRARIES}
 
84
        ${GMODULE_LIBRARIES} 
 
85
        ${EVENT_LIBRARIES}
 
86
)
 
87
 
 
88
ADD_EXECUTABLE(t_network_injection
 
89
        t_network_injection.c 
 
90
        ../../src/network-injection.c 
 
91
        ../../src/glib-ext.c 
 
92
        ../../src/network-mysqld-proto.c 
 
93
        ../../src/network-mysqld-packet.c 
 
94
)
 
95
 
 
96
TARGET_LINK_LIBRARIES(t_network_injection
 
97
        ${GLIB_LIBRARIES}
 
98
        ${GTHREAD_LIBRARIES}
 
99
        ${EVENT_LIBRARIES}
 
100
)
 
101
 
 
102
ADD_EXECUTABLE(t_network_backend
 
103
        t_network_backend.c
 
104
        ../../src/network-backend.c
 
105
        ../../src/network-conn-pool.c
 
106
        ../../src/network-socket.c
 
107
        ../../src/glib-ext.c
 
108
        ../../src/network-mysqld-proto.c
 
109
        ../../src/network-mysqld-packet.c
 
110
        ../../src/network-address.c
 
111
)
 
112
 
 
113
TARGET_LINK_LIBRARIES(t_network_backend
 
114
        ${GLIB_LIBRARIES}
 
115
        ${GTHREAD_LIBRARIES}
 
116
        ${EVENT_LIBRARIES}
 
117
)
 
118
 
 
119
 
 
120
## adding all tests
 
121
 
 
122
ADD_TEST(check_chassis_log check_chassis_log)
 
123
ADD_TEST(check_plugin check_plugin)
 
124
ADD_TEST(check_mysqld_proto check_mysqld_proto)
 
125
#ADD_TEST(check_sql_tokenizer check_sql_tokenizer)
 
126
ADD_TEST(check_loadscript check_loadscript)
 
127
ADD_TEST(check_chassis_path check_chassis_path)
 
128
ADD_TEST(t_network_injection t_network_injection)
 
129
ADD_TEST(t_network_backend t_network_backend)
 
130