-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathCMakeMiscSetup.txt
57 lines (51 loc) · 2.16 KB
/
CMakeMiscSetup.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
# * *************************************************************
# *
# * Soft Active Mater on Surfaces (SAMoS)
# *
# * Author: Rastko Sknepnek
# *
# * Division of Physics
# * School of Engineering, Physics and Mathematics
# * University of Dundee
# *
# * (c) 2013, 2014
# *
# * School of Science and Engineering
# * School of Life Sciences
# * University of Dundee
# *
# * (c) 2015
# *
# * Author: Silke Henkes
# *
# * Department of Physics
# * Institute for Complex Systems and Mathematical Biology
# * University of Aberdeen
# *
# * (c) 2014, 2015
# *
# * This program cannot be used, copied, or modified without
# * explicit written permission of the authors.
# *
# * **************************************************************
## Set the option for swithcihng on and off of the static linking
OPTION(ENABLE_STATIC "Link as many libraries as possible statically, cannot be changed after the first run of CMake" OFF)
mark_as_advanced(ENABLE_STATIC)
## Optionally enable documentation build
find_package(Doxygen)
if (DOXYGEN_FOUND)
# get the doxygen version
exec_program(${DOXYGEN_EXECUTABLE} ${SAMoS_SOURCE_DIR} ARGS --version OUTPUT_VARIABLE DOXYGEN_VERSION)
STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" DOXYGEN_VERSION_MAJOR "${DOXYGEN_VERSION}")
STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" DOXYGEN_VERSION_MINOR "${DOXYGEN_VERSION}")
STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" DOXYGEN_VERSION_PATCH "${DOXYGEN_VERSION}")
if (DOXYGEN_VERSION_MAJOR GREATER 0 AND DOXYGEN_VERSION_MINOR GREATER 4 AND DOXYGEN_VERSION_PATCH GREATER 0)
OPTION(ENABLE_DOXYGEN "Enables building of documentation with doxygen" ON)
else (DOXYGEN_VERSION_MAJOR GREATER 0 AND DOXYGEN_VERSION_MINOR GREATER 4 AND DOXYGEN_VERSION_PATCH GREATER 0)
message(STATUS "Doxygen version less than 1.5.5, defaulting ENABLE_DOXYGEN=OFF")
OPTION(ENABLE_DOXYGEN "Enables building of documentation with doxygen" OFF)
endif (DOXYGEN_VERSION_MAJOR GREATER 0 AND DOXYGEN_VERSION_MINOR GREATER 4 AND DOXYGEN_VERSION_PATCH GREATER 0)
endif (DOXYGEN_FOUND)
##################################
## find the threads library
find_package(Threads)