-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
47 lines (36 loc) · 1.22 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
cmake_minimum_required(VERSION 2.8)
project(EMPHF)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
configure_file(
${EMPHF_SOURCE_DIR}/emphf_config.hpp.in
${EMPHF_SOURCE_DIR}/emphf_config.hpp)
option(EMPHF_USE_POPCOUNT
"Use hardware popcount in hash computation (requires SSE4.2)"
OFF)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif ()
if (UNIX)
# C++11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# Extensive warnings
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-missing-braces")
if (EMPHF_USE_POPCOUNT)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2")
endif ()
else ()
message (FATAL_ERROR "Unsupported platform")
endif ()
# Sequential version
add_executable(compute_mphf_seq compute_mphf_seq.cpp)
# Sort-and-scan version (internal memory and mmap)
add_executable(compute_mphf_scan compute_mphf_scan.cpp)
add_executable(compute_mphf_scan_mmap compute_mphf_scan_mmap.cpp)
# HEM
add_executable(compute_mphf_hem compute_mphf_hem.cpp)
# Utilities
add_executable(test_mphf test_mphf.cpp)
add_executable(test_mphf_hem test_mphf_hem.cpp)
add_executable(gen_synthetic_data gen_synthetic_data.cpp)