-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
executable file
·29 lines (28 loc) · 1.01 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
cmake_minimum_required(VERSION 3.18)
set(AppName FieldBlock)
set(AppSrc field_block.cpp)
set(LibSrc block.cpp)
set(LibHeadList "")
set(SpaceDim 3)
if (NOT OPTIMISE)
# Set the path for LibSrc
set(LibSrcPath "")
foreach(Src IN LISTS LibSrc)
list(APPEND LibSrcPath ${LibDir}/${Src})
endforeach(Src IN LISTS LibSrc)
SeqDevTarget("${SpaceDim}" 0)
MpiDevTarget("${SpaceDim}" 0)
else()
#set the files needed to be translated by ops.py from the app side
set(AppSrcGenList field_block.cpp)
set(AppKernelGenList setvalue_kernel.inc)
set(AppHeadList "")
CreateTempDir()
set(TMP_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/tmp)
set(HeadList ${LibHeadList} ${AppHeadList})
WriteJsonConfig(${TMP_SOURCE_DIR} ${AppName} "${LibSrc}" "${AppSrcGenList}" "${AppKernelGenList}" "${HeadList}" ${SpaceDim})
TranslateSourceCodes(${LibDir} "${LibSrcGenList}" "${AppSrcGenList}" ${TMP_SOURCE_DIR})
SeqTarget("${SpaceDim}")
MpiTarget("${SpaceDim}")
CudaTarget("${SpaceDim}")
endif ()