-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
49 lines (38 loc) · 1.37 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
48
49
include(FetchContent)
cmake_minimum_required(VERSION 3.26)
project(database_controller_hse)
set(CMAKE_CXX_STANDARD 20)
option(BUILD_TESTS "Build tests" OFF)
enable_testing()
# Set the directory where external content will be downloaded
set(FETCHCONTENT_BASE_DIR ${CMAKE_SOURCE_DIR}/external)
# FetchContent for googletest
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/refs/heads/main.zip
SOURCE_DIR ${FETCHCONTENT_BASE_DIR}/googletest
)
FetchContent_MakeAvailable(googletest)
add_subdirectory(src/Calculator)
add_subdirectory(src/database/Database)
add_subdirectory(src/database/Table)
add_subdirectory(src/query_language/Result)
add_subdirectory(src/query_language/Executor)
add_subdirectory(src/query_language/Parser)
add_subdirectory(src/query_language/Query)
set(SOURCE_FILES
main.cpp
src/database/Database/Database.cpp
src/database/Table/Table.cpp
src/query_language/Executor/Executor.cpp
src/query_language/Query/Query.cpp
src/query_language/Result/Result.cpp
src/types.cpp
src/query_language/Parser/Parser.cpp
)
add_executable(database ${SOURCE_FILES})
target_link_libraries(database PRIVATE Calculator Database Table Result Executor Parser Query)
#target_compile_options(database PRIVATE
# $<$<CXX_COMPILER_ID:MSVC>:/W4 /WX>
# $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -Wpedantic -Werror>
#)