-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
243 lines (237 loc) · 6.55 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# this is the build file for project
# it is autogenerated by the xmake build system.
# do not edit by hand.
# project
cmake_minimum_required(VERSION 3.15.0)
cmake_policy(SET CMP0091 NEW)
project(app LANGUAGES CXX C)
# target
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
add_executable(app "")
set_target_properties(app PROPERTIES OUTPUT_NAME "app")
set_target_properties(app PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/app")
add_dependencies(app lib)
target_include_directories(app PRIVATE
include
/usr/local/include
/usr/include
)
target_include_directories(app PRIVATE
/home/pablo/.xmake/packages/c/cxxopts/v3.0.0/533f1970a0884648838ce983784f4181/include
)
target_compile_options(app PRIVATE
$<$<COMPILE_LANGUAGE:C>:-m64>
$<$<COMPILE_LANGUAGE:CXX>:-m64>
$<$<COMPILE_LANGUAGE:C>:-std=c++2b>
$<$<COMPILE_LANGUAGE:CXX>:-std=c++2b>
$<$<COMPILE_LANGUAGE:C>:-DNDEBUG>
$<$<COMPILE_LANGUAGE:CXX>:-DNDEBUG>
)
if(MSVC)
target_compile_options(app PRIVATE -W3)
target_compile_options(app PRIVATE -WX)
else()
target_compile_options(app PRIVATE -Wall)
target_compile_options(app PRIVATE -Werror)
endif()
if(MSVC)
target_compile_options(app PRIVATE $<$<CONFIG:Release>:-Ox -fp:fast>)
else()
target_compile_options(app PRIVATE -O3)
endif()
if(MSVC)
else()
target_compile_options(app PRIVATE -fvisibility=hidden)
endif()
if(MSVC)
set_property(TARGET app PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
target_link_libraries(app PRIVATE
fmt
lib
)
target_link_directories(app PRIVATE
app
)
target_link_options(app PRIVATE
-m64
)
target_sources(app PRIVATE
src/main.cpp
)
# target
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
add_executable(app_bench "")
set_target_properties(app_bench PROPERTIES OUTPUT_NAME "app_bench")
set_target_properties(app_bench PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/app")
add_dependencies(app_bench lib)
target_include_directories(app_bench PRIVATE
include
/usr/local/include
/usr/include
)
target_include_directories(app_bench PRIVATE
/home/pablo/.xmake/packages/b/benchmark/1.7.0/41e335b0d4864392b8c21cd6ed5e875b/include
)
target_compile_options(app_bench PRIVATE
$<$<COMPILE_LANGUAGE:C>:-m64>
$<$<COMPILE_LANGUAGE:CXX>:-m64>
$<$<COMPILE_LANGUAGE:C>:-std=c++2b>
$<$<COMPILE_LANGUAGE:CXX>:-std=c++2b>
$<$<COMPILE_LANGUAGE:C>:-DNDEBUG>
$<$<COMPILE_LANGUAGE:CXX>:-DNDEBUG>
)
if(MSVC)
target_compile_options(app_bench PRIVATE -W3)
target_compile_options(app_bench PRIVATE -WX)
else()
target_compile_options(app_bench PRIVATE -Wall)
target_compile_options(app_bench PRIVATE -Werror)
endif()
if(MSVC)
target_compile_options(app_bench PRIVATE $<$<CONFIG:Release>:-Ox -fp:fast>)
else()
target_compile_options(app_bench PRIVATE -O3)
endif()
if(MSVC)
else()
target_compile_options(app_bench PRIVATE -fvisibility=hidden)
endif()
if(MSVC)
set_property(TARGET app_bench PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
target_link_libraries(app_bench PRIVATE
benchmark_main
benchmark
lib
fmt
pthread
)
target_link_directories(app_bench PRIVATE
/home/pablo/.xmake/packages/b/benchmark/1.7.0/41e335b0d4864392b8c21cd6ed5e875b/lib
app
)
target_link_options(app_bench PRIVATE
-m64
)
target_sources(app_bench PRIVATE
bench/lib/cipher_dsa_benchmarks.cpp
bench/main.cpp
)
# target
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
add_executable(app_test "")
set_target_properties(app_test PROPERTIES OUTPUT_NAME "app_test")
set_target_properties(app_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/app")
add_dependencies(app_test lib)
target_include_directories(app_test PRIVATE
include
/usr/local/include
/usr/include
)
target_include_directories(app_test PRIVATE
/home/pablo/.xmake/packages/g/gtest/1.12.1/20a632ab8cd449b696b952cd2c20ce18/include
)
target_compile_options(app_test PRIVATE
$<$<COMPILE_LANGUAGE:C>:-m64>
$<$<COMPILE_LANGUAGE:CXX>:-m64>
$<$<COMPILE_LANGUAGE:C>:-std=c++2b>
$<$<COMPILE_LANGUAGE:CXX>:-std=c++2b>
$<$<COMPILE_LANGUAGE:C>:-DNDEBUG>
$<$<COMPILE_LANGUAGE:CXX>:-DNDEBUG>
)
if(MSVC)
target_compile_options(app_test PRIVATE -W3)
target_compile_options(app_test PRIVATE -WX)
else()
target_compile_options(app_test PRIVATE -Wall)
target_compile_options(app_test PRIVATE -Werror)
endif()
if(MSVC)
target_compile_options(app_test PRIVATE $<$<CONFIG:Release>:-Ox -fp:fast>)
else()
target_compile_options(app_test PRIVATE -O3)
endif()
if(MSVC)
else()
target_compile_options(app_test PRIVATE -fvisibility=hidden)
endif()
if(MSVC)
set_property(TARGET app_test PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
target_link_libraries(app_test PRIVATE
gtest
gtest_main
gmock
lib
fmt
pthread
)
target_link_directories(app_test PRIVATE
/home/pablo/.xmake/packages/g/gtest/1.12.1/20a632ab8cd449b696b952cd2c20ce18/lib
app
)
target_link_options(app_test PRIVATE
-m64
)
target_sources(app_test PRIVATE
test/lib/lib_tests.cpp
test/main.cpp
)
# target
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
add_library(lib STATIC "")
set_target_properties(lib PROPERTIES OUTPUT_NAME "lib")
set_target_properties(lib PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/app")
target_include_directories(lib PRIVATE
include
/usr/local/include
/usr/include
)
target_include_directories(lib PRIVATE
/home/pablo/.xmake/packages/c/cxxopts/v3.0.0/533f1970a0884648838ce983784f4181/include
)
target_compile_options(lib PRIVATE
$<$<COMPILE_LANGUAGE:C>:-m64>
$<$<COMPILE_LANGUAGE:CXX>:-m64>
$<$<COMPILE_LANGUAGE:C>:-std=c++2b>
$<$<COMPILE_LANGUAGE:CXX>:-std=c++2b>
$<$<COMPILE_LANGUAGE:C>:-DNDEBUG>
$<$<COMPILE_LANGUAGE:CXX>:-DNDEBUG>
)
if(MSVC)
target_compile_options(lib PRIVATE -W3)
target_compile_options(lib PRIVATE -WX)
else()
target_compile_options(lib PRIVATE -Wall)
target_compile_options(lib PRIVATE -Werror)
endif()
if(MSVC)
target_compile_options(lib PRIVATE $<$<CONFIG:Release>:-Ox -fp:fast>)
else()
target_compile_options(lib PRIVATE -O3)
endif()
if(MSVC)
else()
target_compile_options(lib PRIVATE -fvisibility=hidden)
endif()
if(MSVC)
set_property(TARGET lib PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
target_link_libraries(lib PRIVATE
fmt
)
target_link_options(lib PRIVATE
-m64
)
target_sources(lib PRIVATE
src/lib/lib.cpp
)