2017-02-04 03:53:55 +05:30
|
|
|
# special flags for some files
|
2018-05-24 10:43:12 +05:30
|
|
|
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
2017-02-04 03:53:55 +05:30
|
|
|
# long lines for interaction matrix
|
2019-04-03 22:08:46 +05:30
|
|
|
SET_SOURCE_FILES_PROPERTIES("lattice.f90" PROPERTIES COMPILE_FLAGS "-ffree-line-length-240")
|
2016-03-08 04:30:12 +05:30
|
|
|
endif()
|
2017-02-04 03:53:55 +05:30
|
|
|
|
2019-04-03 22:08:46 +05:30
|
|
|
file(GLOB_RECURSE sources *.f90 *.c)
|
2019-01-28 23:16:47 +05:30
|
|
|
|
2019-04-03 22:08:46 +05:30
|
|
|
# probably we should have subfolders for abaqus and MSC.Marc
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*CPFEM\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*DAMASK_marc.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*mesh_marc.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*mesh_abaqus.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*commercialFEM_fileList.*\\.f90")
|
2016-05-21 18:36:01 +05:30
|
|
|
|
|
|
|
|
2019-04-25 10:38:32 +05:30
|
|
|
if (PROJECT_NAME STREQUAL "damask-grid")
|
2016-05-21 18:36:01 +05:30
|
|
|
|
2019-04-03 22:08:46 +05:30
|
|
|
# probably we should have subfolders for FEM and spectral
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*DAMASK_FEM.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*FEM_utilities.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*FEM_zoo.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*mesh_FEM.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*FEM_mech.*\\.f90")
|
2018-08-18 19:28:42 +05:30
|
|
|
|
2018-05-24 10:43:12 +05:30
|
|
|
if(NOT CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
|
2019-04-03 22:08:46 +05:30
|
|
|
add_executable(DAMASK_spectral ${sources})
|
2019-04-26 21:09:21 +05:30
|
|
|
install (TARGETS DAMASK_spectral RUNTIME)
|
2017-05-25 01:46:35 +05:30
|
|
|
else()
|
2019-04-03 22:08:46 +05:30
|
|
|
add_library(DAMASK_spectral OBJECT ${sources})
|
2019-04-26 21:09:21 +05:30
|
|
|
exec_program (mktemp OUTPUT_VARIABLE nothing)
|
|
|
|
exec_program (mktemp ARGS -d OUTPUT_VARIABLE black_hole)
|
|
|
|
install (PROGRAMS ${nothing} DESTINATION ${black_hole})
|
2017-02-04 05:31:42 +05:30
|
|
|
endif()
|
2018-08-18 19:28:42 +05:30
|
|
|
|
2019-04-25 10:38:32 +05:30
|
|
|
elseif (PROJECT_NAME STREQUAL "damask-mesh")
|
2019-04-03 22:08:46 +05:30
|
|
|
|
|
|
|
# probably we should have subfolders for FEM and spectral
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*DAMASK_grid.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*grid_mech_FEM.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*grid_mech_spectral_basic.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*grid_mech_spectral_polarisation.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*grid_damage_spectral.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*grid_thermal_spectral.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*spectral_utilities.*\\.f90")
|
|
|
|
list(FILTER sources EXCLUDE REGEX ".*mesh_grid.*\\.f90")
|
|
|
|
|
2019-04-03 23:53:46 +05:30
|
|
|
add_executable(DAMASK_FEM ${sources})
|
2019-04-26 21:09:21 +05:30
|
|
|
install (TARGETS DAMASK_FEM RUNTIME)
|
2019-04-03 22:08:46 +05:30
|
|
|
|
2016-05-21 18:36:01 +05:30
|
|
|
endif()
|