-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (31 loc) · 1023 Bytes
/
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
# file: CMakeLists.txt
# date: 2022-01-20
cmake_minimum_required(VERSION 3.14)
project(osimhash)
include(FetchContent)
include(ExternalProject)
# No compiling optimization, very slow
#set(CMAKE_CXX_FLAGS "-fopenmp")
# Compiling optimization params
set(CMAKE_CXX_FLAGS
"-fopenmp -pthread -std=c++14 -funroll-loops -O3 -march=native")
option(OSIMHASH_BENCHMARK "Benchmarking." ON)
option(OSIMHASH_PY_BIND "Builds python binder." ON)
set(FETCHCONTENT_QUIET FALSE)
set(GIT_HOST "ghproxy.com/https://github.com")
ExternalProject_Add(
simhash
PREFIX _exts
GIT_REPOSITORY https://${GIT_HOST}/yanyiwu/simhash.git
GIT_TAG master
CMAKE_ARGS
-DBENCHMARK=OFF
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
BUILD_COMMAND ""
INSTALL_COMMAND "")
ExternalProject_Get_Property(simhash source_dir)
include_directories(${source_dir}/include)
include_directories(${source_dir}/deps)
include_directories(${PROJECT_SOURCE_DIR}/include)
add_subdirectory(benchmarks/cpp)
add_subdirectory(bindings/python)