forked from Schiller-Lab/hemelb-gpu
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
41 lines (28 loc) · 1.11 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
# This file is part of HemeLB and is Copyright (C)
# the HemeLB team and/or their institutions, as detailed in the
# file AUTHORS. This software is provided under the terms of the
# license in the file LICENSE.
cmake_minimum_required (VERSION 3.10)
project(HemeLBMaster)
include(ExternalProject)
set(HEMELB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
# Include the options for the main code
include("Code/cmake/options.cmake")
# and create a list of them to pass to the main configure step
hemelb_pass_cmake_defines(HEMELB_CODE_CMAKE_DEFINES)
#------- Dependencies -----------
add_subdirectory(dependencies)
# ------ HemeLB ------------------
message("${PROJECT_SOURCE_DIR}/Code")
ExternalProject_Add(
hemelb
URL ${PROJECT_SOURCE_DIR}/Code
CONFIGURE_COMMAND ${CMAKE_COMMAND} <SOURCE_DIR> ${HEMELB_CODE_CMAKE_DEFINES}
BUILD_COMMAND make -j${HEMELB_SUBPROJECT_MAKE_JOBS}
)
# These are handled in dependencies/CMakeLists.txt and needed here
# to ensure they are build in correct order.
add_dependencies(hemelb cppunit parmetis tinyxml boost ctemplate zlib)
if(HEMELB_BUILD_MULTISCALE)
add_dependencies(hemelb mpwide)
endif()