-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·55 lines (42 loc) · 1.73 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
cmake_minimum_required(VERSION 2.6)
SET(CMAKE_VERBOSE_MAKEFILE 0)
PROJECT(brainid)
# Find ITK.
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
MESSAGE(FATAL_ERROR "Cannot build without ITK. Please set ITK_DIR.")
ENDIF(ITK_FOUND)
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -pg")
set(CMAKE_CXX_FLAGS_GENERIC "")
# Find dysii
#FIND_PACKAGE(dysii)
#if(dysii_found)
# include(${dysii_use_file})
#else(itk_found)
# MESSAGE(FATAL_ERROR "Cannont build without dysii, please set dysii_DIR.")
#endif(itk_found)
find_path(dysii_INCLUDE_DIRS indii/ml/filter/ParticleFilter.hpp)
FIND_LIBRARY(dysii_LIBRARY_DIRS NAMES dysii PATH /usr/lib)
find_path(BOOST_INCLUDE_DIRS boost/mpi.h)
FIND_LIBRARY(BOOST_LIBRARY_DIRS NAMES boost_serialization PATH /usr/lib)
find_path(MPI_INCLUDE_DIRS mpi.hpp)
FIND_LIBRARY(MPI_LIBRARY_DIRS NAMES mpi PATH /usr/lib)
find_path(GSL_INCLUDE_DIRS gsl/gsl_errno.h)
FIND_LIBRARY(GSL_LIBRARY_DIRS NAMES gsl PATH /usr/lib)
if(EXISTS ${brainid_SOURCE_DIR}/.git)
set(ARGS log -n 1 --format=%H)
execute_process( COMMAND git ${ARGS} OUTPUT_VARIABLE VERSION)
string(REGEX MATCH "[0-9A-Za-z]*" VERSION ${VERSION})
else(EXISTS ${brainid_SOURCE_DIR}/.git)
set(ARGS info ${brainid_SOURCE_DIR})
execute_process( COMMAND svn ${ARGS} OUTPUT_VARIABLE VERSION)
string(REGEX MATCH "Revision: [0-9]*" VERSION2 ${VERSION})
string(REGEX MATCH "[0-9]+" VERSION ${VERSION2})
endif(EXISTS ${brainid_SOURCE_DIR}/.git)
execute_process(COMMAND date +D%m_%d_%y_T%H_%M OUTPUT_VARIABLE TODAY)
string(REGEX MATCH "[0-9A-Za-z_]*" TODAY ${TODAY})
add_definitions(-DBRAINID_VERSION="${VERSION}_${TODAY}")
message("${VERSION}_${TODAY}")
SUBDIRS(code/utils code testing)