-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
36 lines (26 loc) · 859 Bytes
/
CMakeLists.txt
File metadata and controls
36 lines (26 loc) · 859 Bytes
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
cmake_minimum_required(VERSION 3.14)
project(SQL_Interpreter)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -g")
include(FetchContent)
FetchContent_Declare(
json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.11.2
)
FetchContent_MakeAvailable(json)
FetchContent_Declare(
tabulate
GIT_REPOSITORY https://github.com/p-ranav/tabulate.git
GIT_TAG v1.5
)
FetchContent_MakeAvailable(tabulate)
include_directories(include)
file(GLOB SOURCES "src/*.cpp")
add_executable(SQL_Interpreter ${SOURCES})
target_link_libraries(SQL_Interpreter PRIVATE nlohmann_json tabulate)
add_custom_command(TARGET SQL_Interpreter POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_SOURCE_DIR}/grammar.json
$<TARGET_FILE_DIR:SQL_Interpreter>)