-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
40 lines (26 loc) · 1.44 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
cmake_minimum_required(VERSION 3.18.4)
project(HW-2)
add_subdirectory(project)
option(DEBUG "no release" ON)
option(RELEASE "in production" OFF)
message("IMPERATIVE_MODEL_INCLUDE_DIRS = ${IMPERATIVE_MODEL_INCLUDE_DIRS}")
message("IMPERATIVE_MODEL_LIB_LIBRARIES = ${IMPERATIVE_MODEL_LIB_LIBRARIES}")
message("GENERAL_LIB_INCLUDE_DIRS = ${GENERAL_LIB_INCLUDE_DIRS}")
message("GENERAL_LIB_LIBRARIES = ${GENERAL_LIB_LIBRARIES}")
message("MULTI_THREADED_MODEL_INCLUDE_DIRS = ${MULTI_THREADED_MODEL_INCLUDE_DIRS}")
message("MULTI_THREADED_MODEL_LIB_LIBRARIES = ${MULTI_THREADED_MODEL_LIB_LIBRARIES}")
if (DEBUG)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_FLAGS "-g -lpthread -fprofile-arcs -ftest-coverage -fPIC -O0 -fPIC -Wall -Wextra -Werror -Wpedantic")
set(CMAKE_C_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -coverage -lgcov")
endif(DEBUG)
file(GLOB SOURCES project/main.c)
add_executable(${PROJECT_NAME} ${SOURCES})
target_include_directories(${PROJECT_NAME} PUBLIC ${GENERAL_LIB_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} PUBLIC ${GENERAL_LIB_LIBRARIES})
target_include_directories(${PROJECT_NAME} PUBLIC ${IMPERATIVE_MODEL_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} PUBLIC ${IMPERATIVE_MODEL_LIB_LIBRARIES})
target_include_directories(${PROJECT_NAME} PUBLIC ${MULTI_THREADED_MODEL_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} PUBLIC ${MULTI_THREADED_MODEL_LIB_LIBRARIES})
add_subdirectory(generator_data)
add_subdirectory(gtest)