-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
47 lines (33 loc) · 981 Bytes
/
CMakeLists.txt
File metadata and controls
47 lines (33 loc) · 981 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
37
38
39
40
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.22)
project(small_sql
VERSION 1.0
LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_compile_options("-Wall")
#add_compile_options("-Werror")
add_compile_options("-Wextra")
add_compile_options("-DDEBUG")
include_directories(${PROJECT_SOURCE_DIR}/include)
file(GLOB_RECURSE REPO_SRC src/*.cpp)
#add_library(small_sql SHARED ${REPO_SRC})
add_library(small_sql STATIC ${REPO_SRC})
target_include_directories(small_sql PRIVATE REPO_SRC)
target_include_directories(small_sql
PUBLIC
${PROJECT_SOURCE_DIR}/include
)
enable_testing()
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})
file(GLOB TEST_SRC tests/*.cpp)
add_executable(small_sql_tests ${TEST_SRC})
target_link_libraries(small_sql_tests
GTest::GTest
GTest::Main
small_sql
)
include(GoogleTest)
gtest_discover_tests(small_sql_tests)