4 space indentation
This commit is contained in:
parent
f5bd544b36
commit
9690f170e1
|
@ -6,7 +6,7 @@ cmake_minimum_required (VERSION 3.10.0 FATAL_ERROR)
|
||||||
# Find PETSc from system environment
|
# Find PETSc from system environment
|
||||||
set(PETSC_DIR $ENV{PETSC_DIR})
|
set(PETSC_DIR $ENV{PETSC_DIR})
|
||||||
if (PETSC_DIR STREQUAL "")
|
if (PETSC_DIR STREQUAL "")
|
||||||
message (FATAL_ERROR "PETSc location (PETSC_DIR) is not defined")
|
message (FATAL_ERROR "PETSc location (PETSC_DIR) is not defined")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set (petsc_conf_variables "${PETSC_DIR}/lib/petsc/conf/variables")
|
set (petsc_conf_variables "${PETSC_DIR}/lib/petsc/conf/variables")
|
||||||
|
@ -118,7 +118,7 @@ endif ()
|
||||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "")
|
if (CMAKE_BUILD_TYPE STREQUAL "")
|
||||||
set (CMAKE_BUILD_TYPE "RELEASE")
|
set (CMAKE_BUILD_TYPE "RELEASE")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Predefined sets for OPTIMIZATION/OPENMP based on BUILD_TYPE
|
# Predefined sets for OPTIMIZATION/OPENMP based on BUILD_TYPE
|
||||||
|
@ -165,13 +165,13 @@ add_definitions (-DDAMASKVERSION="${DAMASK_V}")
|
||||||
add_definitions (-DPETSc)
|
add_definitions (-DPETSc)
|
||||||
|
|
||||||
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
|
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
|
||||||
include(Compiler-Intel)
|
include (Compiler-Intel)
|
||||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
||||||
include(Compiler-GNU)
|
include (Compiler-GNU)
|
||||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "PGI")
|
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "PGI")
|
||||||
include(Compiler-PGI)
|
include (Compiler-PGI)
|
||||||
else ()
|
else ()
|
||||||
message (FATAL_ERROR "Compiler type (CMAKE_Fortran_COMPILER_ID) not recognized")
|
message (FATAL_ERROR "Compiler type (CMAKE_Fortran_COMPILER_ID) not recognized")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
@ -179,8 +179,8 @@ set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${BUILDCMD_PRE} ${OPENMP_FLAGS} ${
|
||||||
set (CMAKE_Fortran_LINK_EXECUTABLE "${BUILDCMD_PRE} ${PETSC_LINKER} ${OPENMP_FLAGS} ${OPTIMIZATION_FLAGS} ${LINKER_FLAGS}")
|
set (CMAKE_Fortran_LINK_EXECUTABLE "${BUILDCMD_PRE} ${PETSC_LINKER} ${OPENMP_FLAGS} ${OPTIMIZATION_FLAGS} ${LINKER_FLAGS}")
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "DEBUG")
|
if (CMAKE_BUILD_TYPE STREQUAL "DEBUG")
|
||||||
set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${DEBUG_FLAGS}")
|
set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${DEBUG_FLAGS}")
|
||||||
set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} ${DEBUG_FLAGS}")
|
set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} ${DEBUG_FLAGS}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${PETSC_INCLUDES} ${BUILDCMD_POST}")
|
set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${PETSC_INCLUDES} ${BUILDCMD_POST}")
|
||||||
|
|
|
@ -4,37 +4,37 @@ if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
||||||
SET_SOURCE_FILES_PROPERTIES("lattice.f90" PROPERTIES COMPILE_FLAGS "-ffree-line-length-240")
|
SET_SOURCE_FILES_PROPERTIES("lattice.f90" PROPERTIES COMPILE_FLAGS "-ffree-line-length-240")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB damask-sources *.f90 *.c)
|
file (GLOB damask-sources *.f90 *.c)
|
||||||
|
|
||||||
# probably we should have subfolders for abaqus and MSC.Marc
|
# probably we should have subfolders for abaqus and MSC.Marc
|
||||||
list(FILTER damask-sources EXCLUDE REGEX ".*CPFEM.f90")
|
list (FILTER damask-sources EXCLUDE REGEX ".*CPFEM.f90")
|
||||||
list(FILTER damask-sources EXCLUDE REGEX ".*DAMASK_marc.*.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_marc.*.f90")
|
||||||
list(FILTER damask-sources EXCLUDE REGEX ".*mesh_abaqus.*.f90")
|
list (FILTER damask-sources EXCLUDE REGEX ".*mesh_abaqus.*.f90")
|
||||||
list(FILTER damask-sources EXCLUDE REGEX ".*commercialFEM_fileList.*.f90")
|
list (FILTER damask-sources EXCLUDE REGEX ".*commercialFEM_fileList.*.f90")
|
||||||
|
|
||||||
|
|
||||||
if (PROJECT_NAME STREQUAL "damask-grid")
|
if (PROJECT_NAME STREQUAL "damask-grid")
|
||||||
|
|
||||||
list(FILTER damask-sources EXCLUDE REGEX ".*mesh_FEM.*.f90")
|
list (FILTER damask-sources EXCLUDE REGEX ".*mesh_FEM.*.f90")
|
||||||
file(GLOB grid-sources grid/*.f90)
|
file (GLOB grid-sources grid/*.f90)
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
|
if (NOT CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
|
||||||
add_executable(DAMASK_spectral ${damask-sources} ${grid-sources})
|
add_executable (DAMASK_spectral ${damask-sources} ${grid-sources})
|
||||||
install (TARGETS DAMASK_spectral RUNTIME DESTINATION bin)
|
install (TARGETS DAMASK_spectral RUNTIME DESTINATION bin)
|
||||||
else()
|
else()
|
||||||
add_library(DAMASK_spectral OBJECT ${damask-sources} ${grid-sources})
|
add_library (DAMASK_spectral OBJECT ${damask-sources} ${grid-sources})
|
||||||
exec_program (mktemp OUTPUT_VARIABLE nothing)
|
exec_program (mktemp OUTPUT_VARIABLE nothing)
|
||||||
exec_program (mktemp ARGS -d OUTPUT_VARIABLE black_hole)
|
exec_program (mktemp ARGS -d OUTPUT_VARIABLE black_hole)
|
||||||
install (PROGRAMS ${nothing} DESTINATION ${black_hole})
|
install (PROGRAMS ${nothing} DESTINATION ${black_hole})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
elseif (PROJECT_NAME STREQUAL "damask-mesh")
|
elseif (PROJECT_NAME STREQUAL "damask-mesh")
|
||||||
|
|
||||||
list(FILTER damask-sources EXCLUDE REGEX ".*mesh_grid.*.f90")
|
list (FILTER damask-sources EXCLUDE REGEX ".*mesh_grid.*.f90")
|
||||||
file(GLOB mesh-sources mesh/*.f90)
|
file (GLOB mesh-sources mesh/*.f90)
|
||||||
|
|
||||||
add_executable(DAMASK_FEM ${damask-sources} ${mesh-sources})
|
add_executable (DAMASK_FEM ${damask-sources} ${mesh-sources})
|
||||||
install (TARGETS DAMASK_FEM RUNTIME DESTINATION bin)
|
install (TARGETS DAMASK_FEM RUNTIME DESTINATION bin)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue