-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
57 lines (41 loc) · 1.79 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 2.8)
project(UTM)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "-Wall -std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "-Wall -Wno-enum-compare -Wno-sign-compare -std=c++11 ${CMAKE_CXX_FLAGS}")
endif()
make_directory("${CMAKE_BINARY_DIR}/include/UTM")
make_directory("${CMAKE_BINARY_DIR}/data")
include_directories(${CMAKE_BINARY_DIR}/include)
add_subdirectory(src)
add_subdirectory(data)
# add_executable(pda.bin tools/old/mainPDA.cpp)
# target_link_libraries(pda.bin cfglib)
#add_executable(cfg.bin tools/mainCFG.cpp)
#target_link_libraries(cfg.bin cfglib pdalib)
add_executable(cfgParser.bin tools/mainCFGParser.cpp)
target_link_libraries(cfgParser.bin cfglib pdalib)
add_executable(cfgToPda.bin tools/mainCFGtoPDA.cpp)
target_link_libraries(cfgToPda.bin cfglib pdalib)
add_executable(cnfTest.bin tools/mainCNFtest.cpp)
target_link_libraries(cnfTest.bin cfglib)
add_executable(cyk.bin tools/mainCYKTest.cpp)
target_link_libraries(cyk.bin cfglib)
add_executable(tmSimulator.bin tools/mainTMtest.cpp)
target_link_libraries(tmSimulator.bin tmlib)
add_executable(utmSimulator.bin tools/mainUTMtest.cpp)
target_link_libraries(utmSimulator.bin tmlib)
add_executable(tmConverterTest.bin tools/mainTMConverterTest.cpp)
target_link_libraries(tmConverterTest.bin tmlib)
add_executable(Tools_UI.bin tools/mainTools_UI.cpp)
target_link_libraries(Tools_UI.bin cfglib pdalib tmlib uilib)
enable_testing()
add_subdirectory(test)
## GTEST ##
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
add_executable( runUnitTests
test/all.cpp
)
target_link_libraries(runUnitTests gtest gtest_main cfglib pdalib tmlib)
add_test( runUnitTests runUnitTests "${CMAKE_SOURCE_DIR}/data/")