-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
49 lines (38 loc) · 1.35 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
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
project (emtools)
include(ExternalProject)
# C++11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG -march=native")
# Warnings
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall")
# cmakemodules
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
"${CMAKE_CURRENT_SOURCE_DIR}/cmakemodules")
# Find OpenMP
find_package(OpenMP REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
# Tools
add_subdirectory(pSAscan-0.1.0) # SA
add_subdirectory(EM-SuccinctIrreducible-0.1.0) # PLCP
add_subdirectory(LCPscan-0.2.0) # LCP
# Find STXXL
set(STXXL_DIR "" CACHE PATH "STXXL build path")
find_package(STXXL REQUIRED)
# stxxltools
include_directories(${STXXL_INCLUDE_DIRS})
add_subdirectory(stxxltools)
# gen.sh Script
set(TDC_BIN_DIR "" CACHE PATH "tudocomp binary directory")
if(TDC_BIN_DIR STREQUAL "")
message("WARNING: TDC_BIN_DIR is empty, please set it to the path where tudocomp's binaries 'tdc' and 'plcp' are located")
else()
set(TDC_BIN ${TDC_BIN_DIR}/tdc)
set(PLCP_BIN ${TDC_BIN_DIR}/plcp)
configure_file(
${CMAKE_SOURCE_DIR}/gen.sh.in
${CMAKE_BINARY_DIR}/gen.sh
@ONLY)
endif()