forked from statisticalbiotechnology/maracluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·111 lines (89 loc) · 3.91 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#############################################################################
# NAME AND VERSION
###############################################################################
cmake_minimum_required(VERSION 2.6)
project(MARACLUSTER)
set(MARACLUSTER_SOURCE_DIR ${CMAKE_SOURCE_DIR})
include("CommonCMake.txt")
###############################################################################
# PREPARING TO INSTALL
###############################################################################
my_set(CMAKE_BUILD_TYPE "Debug" "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel.")
my_set(CMAKE_PREFIX_PATH "../" "Default path to packages")
option(FINGERPRINT_FILTER "Use pre-filtering of spectrum pairs by their fragment fingerprints." OFF)
if(FINGERPRINT_FILTER)
add_definitions(-DFINGERPRINT_FILTER)
endif(FINGERPRINT_FILTER)
option(DOT_PRODUCT "Use dot product similarity measure instead of p values." OFF)
if(DOT_PRODUCT)
add_definitions(-DDOT_PRODUCT)
endif(DOT_PRODUCT)
option(SINGLE_LINKAGE "Use single instead of complete linkage for clustering." OFF)
if(SINGLE_LINKAGE)
add_definitions(-DSINGLE_LINKAGE)
endif(SINGLE_LINKAGE)
# PRINT VARIBALES TO STDOUT
MESSAGE( STATUS )
MESSAGE( STATUS
"-------------------------------------------------------------------------------"
)
MESSAGE( STATUS "Building MARACLUSTER:" )
MESSAGE( STATUS "change a configuration variable with: cmake -D<Variable>=<Value>" )
MESSAGE( STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}" )
MESSAGE( STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}" )
MESSAGE( STATUS "CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}, ${CMAKE_MODULE_PATH}" )
MESSAGE( STATUS "TARGET_ARCH = ${TARGET_ARCH}" )
MESSAGE( STATUS "TOOL CHAIN FILE = ${CMAKE_TOOLCHAIN_FILE}")
MESSAGE( STATUS "PROFILING = ${PROFILING}")
MESSAGE( STATUS
"-------------------------------------------------------------------------------"
)
MESSAGE( STATUS "MARACLUSTER options:" )
MESSAGE( STATUS "FINGERPRINT_FILTER = ${FINGERPRINT_FILTER}")
MESSAGE( STATUS "DOT_PRODUCT = ${DOT_PRODUCT}")
MESSAGE( STATUS "SINGLE_LINKAGE = ${SINGLE_LINKAGE}")
MESSAGE( STATUS
"-------------------------------------------------------------------------------"
)
MESSAGE( STATUS )
# Detect machine architecture, on UNIX:
get_arch("${TARGET_ARCH}")
# STORE NEWLY SET VARIABLES IN *.h.cmake FILES
load_config_files("${CMAKE_CURRENT_SOURCE_DIR}")
###############################################################################
# COMPILING
###############################################################################
add_subdirectory(src)
###############################################################################
# TESTING
###############################################################################
# Enabling system level tests (Ctest)
#enable_testing()
# Scheduling system level tests
#add_subdirectory(data/system_tests/percolator)
# Scheduling unit level tests
#if(GOOGLE_TEST)
# add_subdirectory(data/unit_tests/percolator)
#endif()
###############################################################################
# INSTALLING
###############################################################################
if( MINGW )
message( STATUS " Installing system-libraries: MinGW DLLs." )
#set( CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${MINGW_PATH}/bin/libxerces-c-3-1.dll)
include( InstallRequiredSystemLibraries )
endif( MINGW )
if( MSVC )
message( STATUS " Installing system-libraries: Win32 DLLs." )
#set( CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${XERCESC_LIBRARIES} )
include( InstallRequiredSystemLibraries )
endif( MSVC )
# ###############################################################################
# # PACKAGING
# ###############################################################################
# # PACKAGING OPTIONS: GENERAL
set(PACKAGE_NICKNAME "maracluster")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Clustering spectra")
include("CPack.txt")
set(CPACK_RPM_PACKAGE_DEPENDS "libc6, libgcc1")
include(CPack)