-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
117 lines (102 loc) · 3.41 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
cmake_minimum_required(VERSION 3.21)
include(FeatureSummary)
include(cmake/CPM.cmake)
project(kdevcxx_with_ai LANGUAGES CXX
HOMEPAGE_URL "http://github/arturbac/kdevcxx_with_ai"
DESCRIPTION "KDevelop and Kate OpenAI API plugin"
VERSION 0.1.4
)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(BUILD_SHARED_LIBS OFF)
if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
message(
FATAL_ERROR
"In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there. ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}"
)
endif()
add_compile_options("-fPIC")
#----------------------------------------------------------------
# simple_enum
#----------------------------------------------------------------
CPMAddPackage(
Name simple_enum
GITHUB_REPOSITORY arturbac/simple_enum
GIT_TAG v0.6.2
)
# clang exposes static operators() in c++20 compile mode even when not asked to do so
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options( simple_enum INTERFACE "-Wno-c++23-extensions" )
endif()
find_package(simple_enum REQUIRED)
#----------------------------------------------------------------
# small_vectors
#----------------------------------------------------------------
CPMAddPackage(
small_vectors
GITHUB_REPOSITORY arturbac/small_vectors
GIT_TAG v3.1.1
)
find_package(small_vectors REQUIRED)
# clang exposes static operators() in c++20 compile mode even when not asked to do so
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options( simple_enum INTERFACE "-Wno-c++23-extensions" )
endif()
#----------------------------------------------------------------
# stralgo
#----------------------------------------------------------------
CPMAddPackage(
stralgo
GITHUB_REPOSITORY arturbac/stralgo
GIT_TAG v1.2.1
OPTIONS "STRALGO_ENABLE_UNIT_TESTS=OFF"
)
find_package(stralgo REQUIRED)
# clang exposes static operators() in c++20 compile mode even when not asked to do so
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options( simple_enum INTERFACE "-Wno-c++23-extensions" )
endif()
#----------------------------------------------------------------
# glaze
#----------------------------------------------------------------
CPMAddPackage(
glaze
GITHUB_REPOSITORY stephenberry/glaze
GIT_TAG v2.2.1
)
find_package(glaze REQUIRED)
#----------------------------------------------------------------
# fmt
#----------------------------------------------------------------
CPMAddPackage(
NAME fmt
GITHUB_REPOSITORY fmtlib/fmt
GIT_TAG 10.2.1
)
#----------------------------------------------------------------
# spdlog
#----------------------------------------------------------------
CPMAddPackage(
NAME spdlog
GITHUB_REPOSITORY gabime/spdlog
GIT_TAG v1.13.0
)
find_package(spdlog REQUIRED)
find_package(Boost 1.66.0 REQUIRED COMPONENTS system thread)
find_package(OpenSSL REQUIRED)
include(cmake/building_config.cmake)
add_subdirectory(ai_processing)
enable_testing()
include(CTest)
include(cmake/add_engine_ut.cmake)
add_subdirectory(unittests)
include(cmake/spdx_check.cmake)
#----------------------------------------------------------------
add_subdirectory(src)
# ecm_qt_install_logging_categories(
# EXPORT CXX_WITH_GPT
# FILE cxx_with_gpt.categories
# DESTINATION "${KDE_INSTALL_LOGGINGCATEGORIESDIR}"
# )
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)