-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
38 lines (30 loc) · 1.04 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
cmake_minimum_required(VERSION 3.1.0)
project(pinetree)
# Modern C++ woooo!
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -O0 -g")
# Tell Cmake that headers are also in source directory
include_directories(src/${PROJECT_NAME})
include_directories(tests)
include_directories(lib)
# Pull in source and test files
set(SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/${PROJECT_NAME}")
set(SOURCES
"${SOURCE_DIR}/feature.cpp"
"${SOURCE_DIR}/polymer.cpp"
"${SOURCE_DIR}/choices.cpp"
"${SOURCE_DIR}/tracker.cpp"
"${SOURCE_DIR}/model.cpp"
"${SOURCE_DIR}/gillespie.cpp"
"${SOURCE_DIR}/reaction.cpp")
# Generate python module
add_subdirectory(lib/pybind11)
pybind11_add_module(core ${SOURCES} "${SOURCE_DIR}/python_bindings.cpp")
install(TARGETS core DESTINATION src/${PROJECT_NAME})
SET(TEST_DIR "tests")
SET(TESTS ${SOURCES}
"${TEST_DIR}/test_main.cpp"
"${TEST_DIR}/unit_tests.cpp")
# Generate a test executable
#include_directories(lib/catch/include)
add_executable("${PROJECT_NAME}_test" ${TESTS})