-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
31 lines (22 loc) · 1.34 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
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0015 NEW)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
include(AppendCompilerFlags)
include(ExternalProject)
project(WAND CXX C)
INCLUDE_DIRECTORIES(${CMAKE_HOME_DIRECTORY}/include
${CMAKE_HOME_DIRECTORY}/external/fastpfor/headers/
${CMAKE_BINARY_DIR}/external/sdsl-lite/include
${CMAKE_BINARY_DIR}/external/sdsl-lite/external/libdivsufsort-2.0.1/include
)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/external/sdsl-lite/lib
)
append_cxx_compiler_flags("-O3 -Wno-write-strings -msse4.2 -std=c++11 -DNDEBUG -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -march=native" "GCC" CMAKE_CXX_FLAGS)
ADD_SUBDIRECTORY(external/sdsl-lite)
ADD_LIBRARY(fastpfor_lib STATIC external/fastpfor/src/bitpacking.cpp
external/fastpfor/src/bitpackingaligned.cpp
external/fastpfor/src/bitpackingunaligned.cpp
external/fastpfor/src/simdunalignedbitpacking.cpp
external/fastpfor/src/simdbitpacking.cpp)
ADD_EXECUTABLE(search_index src/search_index.cpp src/compress_qmx.cpp)
TARGET_LINK_LIBRARIES(search_index sdsl divsufsort divsufsort64 pthread fastpfor_lib)