-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
41 lines (30 loc) · 1.25 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 2.6)
project (textmining)
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
if(EXISTS "${CMAKE_MODULE_PATH}/common.cmake")
include(common)
else()
message(FATAL_ERROR "Run ./configure")
endif()
include_directories(src)
# Main binaries
add_executable (TextMiningCompiler src/compiler.cc)
add_executable (TextMiningApp src/app.cc)
set_target_properties(TextMiningCompiler PROPERTIES RUNTIME_OUTPUT_DIRECTORY
"${CMAKE_CURRENT_SOURCE_DIR}")
set_target_properties(TextMiningApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY
"${CMAKE_CURRENT_SOURCE_DIR}")
# Test tools
add_executable (tool-deserialize EXCLUDE_FROM_ALL test/tool-deserialize.cc)
add_executable (tool-deserialize-print EXCLUDE_FROM_ALL
test/tool-deserialize-print.cc)
add_executable (tool-print EXCLUDE_FROM_ALL test/tool-deserialize-print.cc)
add_executable (tool-serialize EXCLUDE_FROM_ALL test/tool-serialize.cc)
add_executable (example-dl EXCLUDE_FROM_ALL test/example-dl.cc)
add_custom_target(tools DEPENDS tool-deserialize tool-deserialize-print
tool-print tool-serialize example-dl)
# Unit tests
enable_testing()
add_executable (unit EXCLUDE_FROM_ALL test/unit.cc)
add_test(unit unit)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS unit)