-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (33 loc) · 1.43 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
cmake_minimum_required(VERSION 3.9)
# Import local CMakeModules folder
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules")
project(checkphase C CXX)
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_STANDARD_REQUIRED 17)
#############################################################################
# C++ source files and target definition
#############################################################################
set(cpp_sources
checkphase.cpp
)
#############################################################################
# Configure libraries
#############################################################################
add_definitions(-x c++)
add_executable(${PROJECT_NAME} ${cpp_sources})
# OpenMP
find_package(OpenMP REQUIRED)
target_link_libraries(${PROJECT_NAME} OpenMP::OpenMP_CXX)
# Zlib
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${ZLIB_LIBRARIES})
# HTSlib
find_package(HTSlib REQUIRED)
include_directories(${HTSlib_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${HTSlib_LIBRARIES})
#target_link_libraries(${PROJECT_NAME} rt)
target_link_libraries(${PROJECT_NAME} curl)
# additional CXX options
set(CXX_WARNINGS "-Wall -Wextra -Wshadow -Wno-deprecated-declarations -Wmissing-include-dirs -Wstrict-aliasing=2 -Wfloat-equal -Wcast-align")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_OPTIONS} ${cxx_compiler_opts} -std=c++11 ${CXX_WARNINGS} -fopenmp -march=native")