diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/test/CMakeLists.txt | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/test/CMakeLists.txt')
-rw-r--r-- | linden/indra/test/CMakeLists.txt | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/linden/indra/test/CMakeLists.txt b/linden/indra/test/CMakeLists.txt new file mode 100644 index 0000000..3d085a7 --- /dev/null +++ b/linden/indra/test/CMakeLists.txt | |||
@@ -0,0 +1,153 @@ | |||
1 | # -*- cmake -*- | ||
2 | |||
3 | project (test) | ||
4 | |||
5 | include(00-Common) | ||
6 | include(LLCommon) | ||
7 | include(LLDatabase) | ||
8 | include(LLInventory) | ||
9 | include(LLMath) | ||
10 | include(LLMessage) | ||
11 | include(LLVFS) | ||
12 | include(LLXML) | ||
13 | include(Linking) | ||
14 | |||
15 | include_directories( | ||
16 | ${LLCOMMON_INCLUDE_DIRS} | ||
17 | ${LLDATABASE_INCLUDE_DIRS} | ||
18 | ${LLMATH_INCLUDE_DIRS} | ||
19 | ${LLMESSAGE_INCLUDE_DIRS} | ||
20 | ${LLINVENTORY_INCLUDE_DIRS} | ||
21 | ${LLVFS_INCLUDE_DIRS} | ||
22 | ${LLXML_INCLUDE_DIRS} | ||
23 | ) | ||
24 | |||
25 | set(test_SOURCE_FILES | ||
26 | common.cpp | ||
27 | inventory.cpp | ||
28 | io.cpp | ||
29 | llapp_tut.cpp | ||
30 | llbase64_tut.cpp | ||
31 | llblowfish_tut.cpp | ||
32 | llbuffer_tut.cpp | ||
33 | lldate_tut.cpp | ||
34 | llerror_tut.cpp | ||
35 | llhost_tut.cpp | ||
36 | llhttpdate_tut.cpp | ||
37 | llhttpclient_tut.cpp | ||
38 | llhttpnode_tut.cpp | ||
39 | llinventoryparcel_tut.cpp | ||
40 | lliohttpserver_tut.cpp | ||
41 | lljoint_tut.cpp | ||
42 | llmime_tut.cpp | ||
43 | llmessageconfig_tut.cpp | ||
44 | llnamevalue_tut.cpp | ||
45 | llpermissions_tut.cpp | ||
46 | llpipeutil.cpp | ||
47 | llquaternion_tut.cpp | ||
48 | llrandom_tut.cpp | ||
49 | llsaleinfo_tut.cpp | ||
50 | llsdmessagebuilder_tut.cpp | ||
51 | llsdmessagereader_tut.cpp | ||
52 | llsd_new_tut.cpp | ||
53 | llsdserialize_tut.cpp | ||
54 | llsdutil_tut.cpp | ||
55 | llservicebuilder_tut.cpp | ||
56 | llstreamtools_tut.cpp | ||
57 | llstring_tut.cpp | ||
58 | lltemplatemessagebuilder_tut.cpp | ||
59 | lltiming_tut.cpp | ||
60 | lltut.cpp | ||
61 | lluri_tut.cpp | ||
62 | lluuidhashmap_tut.cpp | ||
63 | llxfer_tut.cpp | ||
64 | math.cpp | ||
65 | message_tut.cpp | ||
66 | reflection_tut.cpp | ||
67 | test.cpp | ||
68 | v2math_tut.cpp | ||
69 | v3color_tut.cpp | ||
70 | v3dmath_tut.cpp | ||
71 | v3math_tut.cpp | ||
72 | v4color_tut.cpp | ||
73 | v4coloru_tut.cpp | ||
74 | v4math_tut.cpp | ||
75 | ) | ||
76 | |||
77 | set(test_HEADER_FILES | ||
78 | CMakeLists.txt | ||
79 | |||
80 | llpipeutil.h | ||
81 | llsdtraits.h | ||
82 | lltut.h | ||
83 | ) | ||
84 | |||
85 | if (NOT WINDOWS) | ||
86 | list(APPEND test_SOURCE_FILES | ||
87 | llmessagetemplateparser_tut.cpp | ||
88 | ) | ||
89 | endif (NOT WINDOWS) | ||
90 | |||
91 | set_source_files_properties(${test_HEADER_FILES} | ||
92 | PROPERTIES HEADER_FILE_ONLY TRUE) | ||
93 | |||
94 | list(APPEND test_SOURC_FILES ${test_HEADER_FILES}) | ||
95 | |||
96 | add_executable(test ${test_SOURCE_FILES}) | ||
97 | |||
98 | target_link_libraries(test | ||
99 | ${LLDATABASE_LIBRARIES} | ||
100 | ${LLINVENTORY_LIBRARIES} | ||
101 | ${LLMESSAGE_LIBRARIES} | ||
102 | ${LLMATH_LIBRARIES} | ||
103 | ${LLVFS_LIBRARIES} | ||
104 | ${LLXML_LIBRARIES} | ||
105 | ${LLCOMMON_LIBRARIES} | ||
106 | ${PTHREAD_LIBRARY} | ||
107 | ${WINDOWS_LIBRARIES} | ||
108 | ) | ||
109 | |||
110 | if (WINDOWS) | ||
111 | set_target_properties(test | ||
112 | PROPERTIES | ||
113 | LINK_FLAGS "/NODEFAULTLIB:MSVCRT" | ||
114 | LINK_FLAGS_DEBUG "/NODEFAULTLIB:LIBCMT" | ||
115 | ) | ||
116 | endif (WINDOWS) | ||
117 | |||
118 | get_target_property(TEST_EXE test LOCATION) | ||
119 | |||
120 | add_custom_command( | ||
121 | OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt | ||
122 | COMMAND ${TEST_EXE} | ||
123 | ARGS | ||
124 | --output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt | ||
125 | --touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt | ||
126 | DEPENDS test | ||
127 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
128 | COMMENT "C++ unit tests" | ||
129 | ) | ||
130 | |||
131 | set(test_results ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt) | ||
132 | |||
133 | if (EXISTS /etc/debian_version_FAIL) | ||
134 | # The Python tests have all kinds of wacky non-portable assumptions | ||
135 | # built in. | ||
136 | |||
137 | add_custom_command( | ||
138 | OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/py_tests_ok.txt | ||
139 | COMMAND ${PYTHON_EXECUTABLE} | ||
140 | ARGS | ||
141 | ${CMAKE_CURRENT_SOURCE_DIR}/test.py | ||
142 | --mode=static | ||
143 | --output=${CMAKE_CURRENT_BINARY_DIR}/py_test_results.txt | ||
144 | --touch=${CMAKE_CURRENT_BINARY_DIR}/py_tests_ok.txt | ||
145 | DEPENDS test.py | ||
146 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
147 | COMMENT "Python unit tests" | ||
148 | ) | ||
149 | |||
150 | list(APPEND test_results ${CMAKE_CURRENT_BINARY_DIR}/py_tests_ok.txt) | ||
151 | endif (EXISTS /etc/debian_version_FAIL) | ||
152 | |||
153 | add_custom_target(tests_ok ALL DEPENDS ${test_results}) | ||