-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
77 lines (63 loc) · 2.39 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
cmake_minimum_required(VERSION 3.0.2)
set(CMAKE_C_COMPILER "g++")
set(CMAKE_CXX_COMPILER "g++")
set(CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 11)
SET(CMAKE_FLAGS "-std=gnu++11")
#SET(CMAKE_EXE_LINKER_FLAGS "-Ofast")
#set(COMPILER_FLAGS "-Wall -Ofast -m64 -Wno-unused-result -Wno-strict-aliasing -Wno-unused-function -Wno-sign-compare")
set(COMPILER_FLAGS "-Wall -m64 -Wno-unused-result -Wno-strict-aliasing -Wno-unused-function -Wno-sign-compare")
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RELEASE)
endif()
#set(CMAKE_CXX_FLAGS "${COMPILER_FLAGS} -pg -pthread -g")
set(CMAKE_CXX_FLAGS_DEBUG "${COMPILER_FLAGS} -g")
set(CMAKE_CXX_FLAGS_RELEASE "${COMPILER_FLAGS} -Ofast")
#set(CMAKE_C_FLAGS "-std=gnu11 ${COMPILER_FLAGS} -g -pg")
set(CMAKE_C_FLAGS_DEBUG "${COMPILER_FLAGS} -g")
set(CMAKE_C_FLAGS_RELEASE "${COMPILER_FLAGS} -Ofast")
# configure a header file to pass some of the CMake settings
# to the source code
#configure_file (
# "${PROJECT_SOURCE_DIR}/Config.h.in"
# "${PROJECT_BINARY_DIR}/Config.h"
# )
# add the binary tree to the search path for include files
# so that we will find Config.h
include_directories(${PROJECT_BINARY_DIR})
# external libraries
# include_directories($ENV{WD}Tools/miniconda2/include)
# link_directories($ENV{WD}Tools/miniconda2/lib)
# include_directories($ENV{CONDA_PREFIX}/include)
# link_directories($ENV{CONDA_PREFIX}/lib)
# link_directories(/usr/lib64)
# check which compiler is used
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
# using Clang
option(COMPILER_CLANG "using Clang to compile" ON)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# using GCC
option(COMPILER_GNU "using GNC to compile" ON)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
# using Intel C++
option(COMPILER_INTEL "using INTEL complier" ON)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# using Visual Studio C++
option(COMPILER_MSVC "using MSVC to compile" ON)
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
#add_subdirectory(gkm)
add_subdirectory(src)
add_subdirectory(base)
add_subdirectory(cqf)
add_subdirectory(core)
#add_subdirectory(CQF-deNoise)
#add_subdirectory(contig)
#add_subdirectory(cqf)
#add_subdirectory(cqf_mt)
#add_subdirectory(cqf_mt_FC)
#add_subdirectory(scaffold)
#set(SH-objs $<TARGET_OBJECTS:gkm-objs> $<TARGET_OBJECTS:base-objs>)
#set(SH-objs $<TARGET_OBJECTS:base-objs>)
#add_library(SH-lib STATIC ${SH-objs})
set(SH-lib base-lib)