avoid issues with long lines
line length <= 132 is already enforced in pre-receive hook
This commit is contained in:
parent
ab2711390b
commit
98fe38a505
|
@ -29,8 +29,8 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -cpp")
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fPIE")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fPIE")
|
||||||
# position independent code
|
# position independent code
|
||||||
|
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffree-line-length-132")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffree-line-length-none")
|
||||||
# restrict line length to the standard 132 characters (lattice.f90 require more characters)
|
# PETSc macros are long, line length is enforced in pre-receive hook
|
||||||
|
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fimplicit-none")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fimplicit-none")
|
||||||
# assume "implicit none" even if not present in source
|
# assume "implicit none" even if not present in source
|
||||||
|
|
|
@ -35,7 +35,7 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -no-ftz")
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable")
|
||||||
# disables warnings ...
|
# disables warnings ...
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} 5268")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} 5268")
|
||||||
# ... the text exceeds right hand column allowed on the line (we have only comments there)
|
# ... the text exceeds right hand column allowed on the line (enforced by pre-receive hook)
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},7624")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},7624")
|
||||||
# ... about deprecated forall (has nice syntax and most likely a performance advantage)
|
# ... about deprecated forall (has nice syntax and most likely a performance advantage)
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -no-ftz")
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable")
|
||||||
# disables warnings ...
|
# disables warnings ...
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} 5268")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} 5268")
|
||||||
# ... the text exceeds right hand column allowed on the line (we have only comments there)
|
# ... the text exceeds right hand column allowed on the line (enforced by pre-receive hook)
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},7624")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},7624")
|
||||||
# ... about deprecated forall (has nice syntax and most likely a performance advantage)
|
# ... about deprecated forall (has nice syntax and most likely a performance advantage)
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
# special flags for some files
|
|
||||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
|
||||||
# long lines for interaction matrix
|
|
||||||
set_source_files_properties("crystal.f90" PROPERTIES COMPILE_FLAGS "-ffree-line-length-240")
|
|
||||||
set_source_files_properties("parallelization.f90" PROPERTIES COMPILE_FLAGS "-ffree-line-length-none")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(GLOB damask-sources CONFIGURE_DEPENDS *.f90 *.c)
|
file(GLOB damask-sources CONFIGURE_DEPENDS *.f90 *.c)
|
||||||
|
|
||||||
if(PROJECT_NAME STREQUAL "damask-grid")
|
if(PROJECT_NAME STREQUAL "damask-grid")
|
||||||
|
@ -18,14 +11,6 @@ elseif(PROJECT_NAME STREQUAL "damask-test")
|
||||||
file(GLOB solver-sources CONFIGURE_DEPENDS test/*.f90)
|
file(GLOB solver-sources CONFIGURE_DEPENDS test/*.f90)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach(solver-source ${solver-sources})
|
|
||||||
file(READ ${solver-source} content)
|
|
||||||
string(FIND "${content}" "CHKERR" found)
|
|
||||||
if((NOT ${found} EQUAL -1) AND (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU"))
|
|
||||||
set_source_files_properties(${solver-source} PROPERTIES COMPILE_FLAGS "-ffree-line-length-none")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
|
if(NOT CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
|
||||||
add_executable(${executable-name} ${damask-sources} ${solver-sources})
|
add_executable(${executable-name} ${damask-sources} ${solver-sources})
|
||||||
|
|
Loading…
Reference in New Issue