forked from maspadaru/laser-plus-plus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
47 lines (39 loc) · 1.46 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
cmake_minimum_required(VERSION 3.7)
# comment out the following lines to use system's default C/C++ compiler
# set(CMAKE_C_COMPILER "clang")
# set(CMAKE_CXX_COMPILER "clang++")
# set(CMAKE_C_COMPILER "gcc")
# set(CMAKE_CXX_COMPILER "g++")
project(Laser++ VERSION 0.1.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
################################### LASER ###################################
include_directories(include/)
include_directories(~/tools/llvm/include/c++/v1/)
file(GLOB LASER_SOURCES
"src/formula/*.cpp"
"src/formula/extended/*.cpp"
"src/util/*.cpp"
"src/rule/*.cpp"
"src/rule/filter/*.cpp"
"src/rule/math/*.cpp"
"src/rule/math/evaluator/*.cpp"
"src/core/*.cpp"
"src/example/*.cpp"
"src/service/*.cpp"
"src/acyclicity/*.cpp"
)
find_package(Threads)
################################## TESTAPP ##################################
add_executable(testapp test/main.cpp ${LASER_SOURCES})
target_link_libraries(testapp ${CMAKE_THREAD_LIBS_INIT})
################################### TESTS ###################################
find_package(GTest)
if(GTEST_FOUND)
file(GLOB TEST_SOURCES
"test/testcase/*.cpp"
)
include_directories(${GTEST_INCLUDE_DIRS})
add_executable(run_gtest test/test.cpp ${LASER_SOURCES} ${TEST_SOURCES})
target_link_libraries(run_gtest ${GTEST_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
endif(GTEST_FOUND)