DAMASK_EICMD/code/CMakeLists.txt

59 lines
1.8 KiB
CMake
Raw Normal View History

2016-02-29 21:20:35 +05:30
# The dependency detection in CMake is not functioning for Fortran
# !!! EXPLICIT DEPENDENCY DECLARATION !!!
2016-03-01 00:27:15 +05:30
add_library(DAMASK_PREC "prec.f90")
2016-02-29 21:20:35 +05:30
if (SPECTRAL)
2016-03-01 00:27:15 +05:30
add_library(DAMASK_INTERFACE "spectral_interface.f90")
target_link_libraries(DAMASK_INTERFACE DAMASK_PREC)
elseif(SPECTRAL)
message(FATAL_ERROR "NOT IMPLEMENTED YET")
endif(SPECTRAL)
add_library(DAMASK_IO "IO.f90")
2016-03-01 00:27:15 +05:30
target_link_libraries(DAMASK_IO DAMASK_INTERFACE)
add_library(DAMASK_LIBS "libs.f90")
target_link_libraries(DAMASK_LIBS DAMASK_IO)
add_library(DAMASK_NUMERICS "numerics.f90")
target_link_libraries(DAMASK_NUMERICS DAMASK_LIBS)
add_library(DAMASK_DEBUG "debug.f90")
target_link_libraries(DAMASK_DEBUG DAMASK_NUMERICS)
2016-03-01 00:27:15 +05:30
add_library(DAMASK_FEsolving "FEsolving.f90")
target_link_libraries(DAMASK_FEsolving DAMASK_DEBUG)
2016-03-01 00:27:15 +05:30
add_library(DAMASK_MATH "math.f90")
target_link_libraries(DAMASK_MATH DAMASK_FEsolving)
2016-03-01 00:27:15 +05:30
# SPECTRAL solver and FEM solver use different mesh
# source files
if (SPECTRAL)
add_library(DAMASK_MESH "mesh.f90")
endif(SPECTRAL)
if (FEM)
add_library(DAMASK_MESH "${FEM_DIR}/meshFEM.f90")
endif(FEM)
target_link_libraries(DAMASK_MESH DAMASK_MATH)
2016-03-01 00:27:15 +05:30
add_library(DAMASK_MATERIAL "material.f90")
target_link_libraries(DAMASK_MATERIAL DAMASK_MESH)
2016-03-01 00:27:15 +05:30
add_library(DAMASK_LATTICE "lattice.f90")
target_link_libraries(DAMASK_LATTICE DAMASK_MATERIAL)
add_library(DAMASK_DRIVERS ALIAS DAMASK_LATTICE)
# For each modular section
add_subdirectory(plastic)
2016-03-01 00:27:15 +05:30
# add_subdirectory(kinematics)
# add_subdirectory(source)
# add_library(DAMASK_CONSTITUTIVE "constitutive.f90")
# target_link_libraries(DAMASK_CONSTITUTIVE DAMASK_DRIVERS)
# add_library(DAMASK_DRIVERS ALIAS DAMASK_CONSTITUTIVE)
# compile spectral solver
add_executable(DAMASKSpectral.exe DAMASK_spectral.f90)
2016-03-01 00:27:15 +05:30
target_link_libraries (DAMASKSpectral.exe DAMASK_PLASTIC)