-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
39 lines (30 loc) · 1 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
cmake_minimum_required(VERSION 3.14)
set(CMAKE_CXX_STANDARD 17)
# Set project name
project(AB-PARSER)
include_directories(src)
file(GLOB source_list RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
src/*.cpp
)
# ~~~~~~~
# Testing
# ~~~~~~~
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# Making a library without the main, for the tests and the program
add_library(${PROJECT_NAME} ${source_list})
target_include_directories(${PROJECT_NAME} PUBLIC "${PROJECT_SOURCE_DIR}/include")
# -------
# DocTest
# -------
message("Testing activated")
add_subdirectory(external/doctest)
option(TRACY_ENABLE "" ON)
option(TRACY_ON_DEMAND "" OFF)
add_subdirectory(external/tracy)
add_subdirectory(tests)
target_link_libraries(${PROJECT_NAME} PUBLIC TracyClient)
else()
# Making a library without the main, for the tests and the program
add_library(${PROJECT_NAME} ${source_list})
target_include_directories(${PROJECT_NAME} PUBLIC "${PROJECT_SOURCE_DIR}/include")
endif()