-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
65 lines (52 loc) · 2.16 KB
/
CMakeLists.txt
File metadata and controls
65 lines (52 loc) · 2.16 KB
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
#
# global cmake configuration file for ALPSCore
#
cmake_minimum_required (VERSION 2.8.12)
# include cmake scripts from common/cmake directory
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/./common/cmake)
include(ALPSCommonModuleDefinitions)
# check that compiler version is OK.
include(ALPSCompilerVersionCheck)
# take care of compiler-specific tweaks
include(ALPSCompilerTweaks)
# ALPS_GLOBAL_BUILD means building project all at once
set(ALPS_GLOBAL_BUILD true)
# Documentation
option(DocumentationOnly "Build only documentation, no code or tests" OFF)
mark_as_advanced(DocumentationOnly)
option(Documentation "Build documentation" ON)
if (DocumentationOnly)
set(Documentation ON)
endif (DocumentationOnly)
set(_am_building_documentation ${Documentation})
if (Documentation)
message(STATUS "Enable build of documentation")
set(Documentation OFF) # not to spawn make doc jobs for each module
endif(Documentation)
# enable Testing
option(Testing "Enable testing" OFF)
option(ExtensiveTesting "Enable extensive testing, including time consuming tests" OFF)
mark_as_advanced(ExtensiveTesting)
if (Testing AND NOT DocumentationOnly)
enable_testing()
include(ALPSEnableTests) #defined in common/cmake
endif(Testing AND NOT DocumentationOnly)
# each module is defined as a cmake project in a subdirectory
add_subdirectory(mpi_dispatcher)
alps_add_module(alps-mpi_dispatcher mpi_dispatcher)
add_subdirectory(mc)
alps_add_module(alps-mc-extensions mc)
add_subdirectory(gf_extension)
alps_add_module(alps-gf-extensions gf_extension)
if(_am_building_documentation)
set(DOXYFILE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/common/doc")
message(STATUS "Building documentation for sources in ${DOXYFILE_EXTRA_SOURCES}")
set(DOXYFILE_IN "${CMAKE_SOURCE_DIR}/common/doc/Doxyfile.in")
set(CMAKE_PROJECT_NAME "ALPSCore reference") # to provide name for the documentation
include(UseDoxygen)
unset(CMAKE_PROJECT_NAME)
endif(_am_building_documentation)
# unset(_am_building_documentation CACHE)
# miscellaneous operations
# create module file for lmod manager
configure_file("${CMAKE_SOURCE_DIR}/common/misc/alpscore.lmod.in" "${CMAKE_BINARY_DIR}/alpscore-extensions.lmod")