forked from dwinter/accuMUlate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
69 lines (44 loc) · 2.05 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
cmake_minimum_required(VERSION 2.6)
project(accuMUlate)
# guard against in-source builds
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from
there. You may need to remove CMakeCache.txt. ")
endif()
SET(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -O3")
set(CMAKE_CXX_FLAGS_RelWithDebInfo "-std=c++11 -O3 -Wall -Wextra -pedantic -Wno-deprecated -Wno-deprecated-declarations -Wno-deprecated")
set(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -g -O0 -Wvla -Wall -Wextra -pedantic ")
SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ~/local/lib ~/local/include ${CMAKE_INSTALL_PREFIX} ~)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/Modules/")
find_package( Boost COMPONENTS program_options REQUIRED )
find_package( Bamtools REQUIRED )
find_package( Eigen3 3 REQUIRED )
set(LIBS ${LIBS} ${Boost_LIBRARIES} ${Bamtools_LIBRARIES})
set(INCLUDE_DIR ${INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${Bamtools_INCLUDE_DIR} ${EIGEN3_INCLUDE_DIR})
include_directories(SYSTEM ${INCLUDE_DIR})
include_directories("./")
SET(SOURCE_FILES CACHE INTERNAL "Global")
SET(SOURCE_FILES ${SOURCE_FILES}
${CMAKE_CURRENT_SOURCE_DIR}/boost_input_utils.cc
${CMAKE_CURRENT_SOURCE_DIR}/data_struct.h
${CMAKE_CURRENT_SOURCE_DIR}/model.cc
${CMAKE_CURRENT_SOURCE_DIR}/parsers.cc
${CMAKE_CURRENT_SOURCE_DIR}/variant_visitor.cc
CACHE INTERNAL "Global"
)
ADD_SUBDIRECTORY(src)
SET(LOCAL_LIBS LibDistributions LibIoData LibMutations LibStats)
add_executable(accuMUlate main.cc ${SOURCE_FILES})
target_link_libraries(accuMUlate ${LIBS} ${LOCAL_LIBS})
add_executable(denominate denom.cc ${SOURCE_FILES})
target_link_libraries(denominate ${LIBS} ${LOCAL_LIBS})
find_package (GTest)
IF(GTEST_FOUND)
find_package(Threads)
IF(THREADS_FOUND)
SET(GTEST_THREAD_LIB "-lpthread")
ENDIF(THREADS_FOUND)
message("GTEST FOUND! Build UnitTest")
ADD_SUBDIRECTORY(test)
ENDIF(GTEST_FOUND)