DAMASK_EICMD/src/CMakeLists.txt

41 lines
1.5 KiB
CMake
Raw Normal View History

# special flags for some files
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
# 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()
2019-04-29 14:45:23 +05:30
file(GLOB damask-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
2019-04-29 14:45:23 +05:30
list(FILTER damask-sources EXCLUDE REGEX ".*CPFEM.f90")
list(FILTER damask-sources EXCLUDE REGEX ".*DAMASK_marc.*.f90")
list(FILTER damask-sources EXCLUDE REGEX ".*mesh_marc.*.f90")
list(FILTER damask-sources EXCLUDE REGEX ".*mesh_abaqus.*.f90")
list(FILTER damask-sources EXCLUDE REGEX ".*commercialFEM_fileList.*.f90")
if (PROJECT_NAME STREQUAL "damask-grid")
2019-04-29 14:45:23 +05:30
list(FILTER damask-sources EXCLUDE REGEX ".*mesh_FEM.*.f90")
file(GLOB grid-sources grid/*.f90)
if(NOT CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
2019-04-29 14:45:23 +05:30
add_executable(DAMASK_spectral ${damask-sources} ${grid-sources})
2019-04-26 21:37:43 +05:30
install (TARGETS DAMASK_spectral RUNTIME DESTINATION bin)
else()
2019-04-29 14:45:23 +05:30
add_library(DAMASK_spectral OBJECT ${damask-sources} ${grid-sources})
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()
elseif (PROJECT_NAME STREQUAL "damask-mesh")
2019-04-03 22:08:46 +05:30
2019-04-29 14:45:23 +05:30
list(FILTER damask-sources EXCLUDE REGEX ".*mesh_grid.*.f90")
file(GLOB mesh-sources mesh/*.f90)
add_executable(DAMASK_FEM ${damask-sources} ${mesh-sources})
2019-04-26 21:37:43 +05:30
install (TARGETS DAMASK_FEM RUNTIME DESTINATION bin)
2019-04-03 22:08:46 +05:30
endif()