From 5333ddd9dc0fe7a54563fab4536b4a882605c02a Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sun, 10 Jul 2016 14:38:44 -0500 Subject: Remove CMake-language block-end command arguments Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. NOTE: MUST USE GNU compliant version of sed Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed \ && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' \ | xargs -0 gsed -i -f convert.sed \ && rm convert.sed --- CMAKE/CheckTimeFunction.cmake | 6 +++--- CMAKE/FortranMangling.cmake | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'CMAKE') diff --git a/CMAKE/CheckTimeFunction.cmake b/CMAKE/CheckTimeFunction.cmake index 350a5913..b5739488 100644 --- a/CMAKE/CheckTimeFunction.cmake +++ b/CMAKE/CheckTimeFunction.cmake @@ -18,11 +18,11 @@ macro(CHECK_TIME_FUNCTION FUNCTION VARIABLE) message(STATUS "Looking for Fortran ${FUNCTION} - found") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Fortran ${FUNCTION} exists. ${OUTPUT} \n\n") - else(RES) + else() message(STATUS "Looking for Fortran ${FUNCTION} - not found") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Fortran ${FUNCTION} does not exist. \n ${OUTPUT} \n") - endif(RES) -endmacro(CHECK_TIME_FUNCTION) + endif() +endmacro() diff --git a/CMAKE/FortranMangling.cmake b/CMAKE/FortranMangling.cmake index e0a9fd51..d772dc9b 100644 --- a/CMAKE/FortranMangling.cmake +++ b/CMAKE/FortranMangling.cmake @@ -23,7 +23,7 @@ message(STATUS "=========") "Fortran compiler option for setting object file name.") set(F77_OUTPUT_EXE "/Fe" CACHE INTERNAL "Fortran compiler option for setting executable file name.") - else(${F77} STREQUAL "ifort.exe") + else() # in other case, let user specify their fortran configrations. set(F77_OPTION_COMPILE "-c" CACHE STRING "Fortran compiler option for compiling without linking.") @@ -35,7 +35,7 @@ message(STATUS "=========") "Library path for the fortran compiler") set(F77_INCLUDE_PATH "" CACHE PATH "Include path for the fortran compiler") - endif(${F77} STREQUAL "ifort.exe") + endif() message(STATUS "Testing FORTRAN_MANGLING") @@ -102,4 +102,4 @@ message(STATUS "Running ./xintface...") message(FATAL_ERROR "FORTRAN_MANGLING:ERROR ${xintface_ERR}") endif() -endmacro(FORTRAN_MANGLING) +endmacro() -- cgit v1.2.3