-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
36 lines (30 loc) · 1.06 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
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
project(faPTP
LANGUAGES CXX)
if (MSVC)
add_compile_options(/W4 /MP)
set(OPTIMISATION_OPTIONS /O2 /Oi /Ot /Ob2 /arch:AVX /fp:fast)
else()
add_compile_options(-Wall -Wpedantic)
if ((CMAKE_BUILD_TYPE MATCHES Debug) OR (CMAKE_BUILD_TYPE MATCHES RelWithDebInfo))
add_compile_options(-g -fno-omit-frame-pointer)
endif()
set(OPTIMISATION_OPTIONS -Ofast -mavx)
endif()
add_compile_options("$<$<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>:${OPTIMISATION_OPTIONS}>")
find_package(fmt REQUIRED)
find_package(OpenMP REQUIRED)
find_package(jsoncpp REQUIRED)
find_package(CURL REQUIRED)
# Bibliotecas
set(CXXOPTS_BUILD_EXAMPLES OFF CACHE BOOL "Build examples for CXXOpts")
add_subdirectory(lib/cxxopts)
add_subdirectory(lib/fastrange)
add_subdirectory(lib/range)
add_subdirectory(lib/tsl)
add_subdirectory(lib/concurrentqueue)
add_subdirectory(lib/readerwriterqueue)
# Módulos
add_subdirectory(src/faptp)
add_subdirectory(src/faptp-exp)
add_subdirectory(src/faptp-lib)