diff --git a/cmake/Compiler-GNU.cmake b/cmake/Compiler-GNU.cmake index 397d1277b..d024bdc0a 100644 --- a/cmake/Compiler-GNU.cmake +++ b/cmake/Compiler-GNU.cmake @@ -29,8 +29,8 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -cpp") set (COMPILE_FLAGS "${COMPILE_FLAGS} -fPIE") # position independent code -set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffree-line-length-132") -# restrict line length to the standard 132 characters (lattice.f90 require more characters) +set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffree-line-length-none") +# PETSc macros are long, line length is enforced in pre-receive hook set (COMPILE_FLAGS "${COMPILE_FLAGS} -fimplicit-none") # assume "implicit none" even if not present in source diff --git a/cmake/Compiler-Intel.cmake b/cmake/Compiler-Intel.cmake index d68eac50b..19e75a9fa 100644 --- a/cmake/Compiler-Intel.cmake +++ b/cmake/Compiler-Intel.cmake @@ -35,7 +35,7 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -no-ftz") set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable") # disables warnings ... 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") # ... about deprecated forall (has nice syntax and most likely a performance advantage) diff --git a/cmake/Compiler-IntelLLVM.cmake b/cmake/Compiler-IntelLLVM.cmake index f2fb8bce9..86c9d380c 100644 --- a/cmake/Compiler-IntelLLVM.cmake +++ b/cmake/Compiler-IntelLLVM.cmake @@ -37,7 +37,7 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -no-ftz") set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable") # disables warnings ... 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") # ... about deprecated forall (has nice syntax and most likely a performance advantage) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fc9217f31..4d0d8cef0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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) if(PROJECT_NAME STREQUAL "damask-grid") @@ -18,14 +11,6 @@ elseif(PROJECT_NAME STREQUAL "damask-test") file(GLOB solver-sources CONFIGURE_DEPENDS test/*.f90) 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") add_executable(${executable-name} ${damask-sources} ${solver-sources})