-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
50 lines (39 loc) · 1.69 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
#===============================================================================
# Dictionary designed for read-mostly scene.
# Copyright (C) 2020 Ruan Kunliang
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with the This Library; if not, see <https:#www.gnu.org/licenses/>.
#===============================================================================
cmake_minimum_required(VERSION 3.10)
project(estuary)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_SKIP_BUILD_RPATH TRUE)
set(CMAKE_EXE_LINKER_FLAGS -Wl,--rpath=.)
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-unroll-loops -fno-stack-protector")
include_directories(${CMAKE_SOURCE_DIR}/include)
file(GLOB source
src/*.cc
)
add_library(estuary SHARED ${source})
target_link_libraries(estuary pthread)
file(GLOB test_src
test/*.cc
)
add_executable(estuary-test ${test_src})
target_link_libraries(estuary-test pthread gtest estuary)
add_executable(lucky-billion benchmark/lucky-billion.cc)
target_link_libraries(lucky-billion pthread gflags estuary)
add_executable(bench-estuary benchmark/bench-estuary.cc)
target_link_libraries(bench-estuary pthread gflags estuary)