Fix errors in CMake script
This commit is contained in:
parent
7f0275eb27
commit
bf7efad250
|
@ -113,6 +113,8 @@ elseif ("${DAMASK_SOLVER}" STREQUAL "FEM")
|
|||
project (DAMASK_FEM Fortran C)
|
||||
add_definitions (-DFEM)
|
||||
message ("Building FEM Solver\n")
|
||||
else ()
|
||||
message (FATAL_ERROR "DAMASK_SOLVER is not defined!")
|
||||
endif ()
|
||||
|
||||
# set linker commands (needs to be done after defining the project)
|
||||
|
@ -188,7 +190,7 @@ set (DAMASK_INCLUDE_FLAGS "${DAMASK_INCLUDE_FLAGS} ${PETSC_INCLUDES}")
|
|||
###################################################################################################
|
||||
# Intel Compiler
|
||||
###################################################################################################
|
||||
if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
|
||||
if ( CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
|
||||
|
||||
if (OPENMP)
|
||||
set (OPENMP_FLAGS "-qopenmp -parallel")
|
||||
|
@ -308,7 +310,7 @@ if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
|
|||
###################################################################################################
|
||||
# GNU Compiler
|
||||
###################################################################################################
|
||||
elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
|
||||
elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
||||
|
||||
if (OPENMP)
|
||||
set (OPENMP_FLAGS "-fopenmp")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# special flags for some files
|
||||
if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
|
||||
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
||||
SET_SOURCE_FILES_PROPERTIES( "lattice.f90" PROPERTIES
|
||||
COMPILE_FLAGS "-ffree-line-length-240")
|
||||
# long lines for interaction matrix
|
||||
|
@ -22,6 +22,8 @@ if ("${PROJECT_NAME}" STREQUAL "DAMASK_spectral")
|
|||
add_library(DAMASK_INTERFACE OBJECT "spectral_interface.f90")
|
||||
elseif ("${PROJECT_NAME}" STREQUAL "DAMASK_FEM")
|
||||
add_library(DAMASK_INTERFACE OBJECT "FEM_interface.f90")
|
||||
else ()
|
||||
message ( FATAL_ERROR "PROJECT_NAME is not defined!")
|
||||
endif()
|
||||
add_dependencies(DAMASK_INTERFACE PREC)
|
||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DAMASK_INTERFACE>)
|
||||
|
|
Loading…
Reference in New Issue