-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
executable file
·35 lines (25 loc) · 1.48 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
cmake_minimum_required(VERSION 3.0)
project(myproject)
# Set up your source files and add an executable target
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra -g -O3")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_SOURCE_DIR})
add_executable(main ${CMAKE_SOURCE_DIR}/src/main.cpp ${CMAKE_SOURCE_DIR}/lib/simdjson.cpp ${CMAKE_SOURCE_DIR}/graph/authorGraph.cpp ${CMAKE_SOURCE_DIR}/graph/journalGraph.cpp)
add_executable(parse ${CMAKE_SOURCE_DIR}/src/parse.cpp ${CMAKE_SOURCE_DIR}/lib/simdjson.cpp ${CMAKE_SOURCE_DIR}/parsing/parsing.cpp ${CMAKE_SOURCE_DIR}/graph/journalGraph.cpp
${CMAKE_SOURCE_DIR}/graph/authorGraph.cpp)
add_executable(db_interface ${CMAKE_SOURCE_DIR}/src/db_interface.cpp ${CMAKE_SOURCE_DIR}/graph/journalGraph.cpp ${CMAKE_SOURCE_DIR}/graph/authorGraph.cpp)
add_executable(paper_game ${CMAKE_SOURCE_DIR}/src/paper_game.cpp ${CMAKE_SOURCE_DIR}/graph/journalGraph.cpp)
add_executable(run_tests ${CMAKE_SOURCE_DIR}/catch_tests/tests.cpp ${CMAKE_SOURCE_DIR}/graph/authorGraph.cpp ${CMAKE_SOURCE_DIR}/graph/journalGraph.cpp)
target_link_libraries(run_tests Catch2::Catch2WithMain)
include(CTest)
find_package(Catch2 REQUIRED)
include(Catch)
include_directories(${Catch2_INCLUDE_DIRS})
add_custom_target(clean-all
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/main ${CMAKE_BINARY_DIR}/run_tests
)