diff options
author | Hans Johnson <hans-johnson@uiowa.edu> | 2016-07-10 14:38:44 -0500 |
---|---|---|
committer | Hans Johnson <hans-johnson@uiowa.edu> | 2016-07-10 14:38:48 -0500 |
commit | 5333ddd9dc0fe7a54563fab4536b4a882605c02a (patch) | |
tree | 593aa7d8c899b127d6bb38bfb57b163ca63a63f2 | |
parent | b1e0d47edc106af8f1f0b9290785ced77c0ed1d0 (diff) | |
download | lapack-5333ddd9dc0fe7a54563fab4536b4a882605c02a.tar.gz lapack-5333ddd9dc0fe7a54563fab4536b4a882605c02a.tar.bz2 lapack-5333ddd9dc0fe7a54563fab4536b4a882605c02a.zip |
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
-rw-r--r-- | BLAS/CMakeLists.txt | 2 | ||||
-rw-r--r-- | BLAS/TESTING/CMakeLists.txt | 2 | ||||
-rw-r--r-- | CBLAS/CMakeLists.txt | 4 | ||||
-rw-r--r-- | CBLAS/src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | CBLAS/testing/CMakeLists.txt | 2 | ||||
-rw-r--r-- | CMAKE/CheckTimeFunction.cmake | 6 | ||||
-rw-r--r-- | CMAKE/FortranMangling.cmake | 6 | ||||
-rw-r--r-- | CMakeLists.txt | 44 | ||||
-rw-r--r-- | LAPACKE/CMakeLists.txt | 12 | ||||
-rw-r--r-- | TESTING/CMakeLists.txt | 2 | ||||
-rw-r--r-- | TESTING/EIG/CMakeLists.txt | 2 | ||||
-rw-r--r-- | TESTING/LIN/CMakeLists.txt | 2 | ||||
-rw-r--r-- | lapack_build.cmake | 36 |
13 files changed, 64 insertions, 64 deletions
diff --git a/BLAS/CMakeLists.txt b/BLAS/CMakeLists.txt index 45e68e99..9958f8be 100644 --- a/BLAS/CMakeLists.txt +++ b/BLAS/CMakeLists.txt @@ -1,7 +1,7 @@ add_subdirectory(SRC) if(BUILD_TESTING) add_subdirectory(TESTING) -endif(BUILD_TESTING) +endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/blas.pc diff --git a/BLAS/TESTING/CMakeLists.txt b/BLAS/TESTING/CMakeLists.txt index 2b7a6a60..e0d9a05b 100644 --- a/BLAS/TESTING/CMakeLists.txt +++ b/BLAS/TESTING/CMakeLists.txt @@ -43,7 +43,7 @@ macro(add_blas_test name src) -DINTDIR=${CMAKE_CFG_INTDIR} -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") endif() -endmacro(add_blas_test) +endmacro() if(BUILD_SINGLE) add_blas_test(xblat1s sblat1.f) diff --git a/CBLAS/CMakeLists.txt b/CBLAS/CMakeLists.txt index 9f6f043a..a4a9b8d5 100644 --- a/CBLAS/CMakeLists.txt +++ b/CBLAS/CMakeLists.txt @@ -34,11 +34,11 @@ install( FILES ${CBLAS_INCLUDE} ${LAPACK_BINARY_DIR}/include/cblas_mangling.h DE if(BUILD_TESTING) add_subdirectory(testing) add_subdirectory(examples) -endif(BUILD_TESTING) +endif() if(NOT BLAS_FOUND) set(ALL_TARGETS ${ALL_TARGETS} blas) -endif(NOT BLAS_FOUND) +endif() # Export cblas targets from the # install tree, if any. diff --git a/CBLAS/src/CMakeLists.txt b/CBLAS/src/CMakeLists.txt index 41b74a23..90496b92 100644 --- a/CBLAS/src/CMakeLists.txt +++ b/CBLAS/src/CMakeLists.txt @@ -146,22 +146,22 @@ set(ALLOBJ ${SCLEV1} ${SLEV1} ${SLEV2} ${SLEV3} ${ERRHAND} # Single real precision if(CBLAS_SINGLE) set(ALLOBJ ${SCLEV1} ${SLEV1} ${SLEV2} ${SLEV3} ${ERRHAND}) -endif(CBLAS_SINGLE) +endif() # Double real precision if(CBLAS_DOUBLE) set(ALLOBJ ${DLEV1} ${DLEV2} ${DLEV3} ${ERRHAND}) -endif(CBLAS_DOUBLE) +endif() # Single complex precision if (CBLAS_COMPLEX) set(ALLOBJ ${CLEV1} ${SCLEV1} ${CLEV2} ${CLEV3} ${ERRHAND}) -endif(CBLAS_COMPLEX) +endif() # Double complex precision if (CBLAS_COMPLEX16) set(ALLOBJ ${ZLEV1} ${ZLEV2} ${ZLEV3} ${ERRHAND}) -endif(CBLAS_COMPLEX16) +endif() add_library(cblas ${ALLOBJ}) target_link_libraries(cblas ${BLAS_LIBRARIES} ) diff --git a/CBLAS/testing/CMakeLists.txt b/CBLAS/testing/CMakeLists.txt index 2456d229..56480299 100644 --- a/CBLAS/testing/CMakeLists.txt +++ b/CBLAS/testing/CMakeLists.txt @@ -22,7 +22,7 @@ macro(add_cblas_test output input target) -DINTDIR=${CMAKE_CFG_INTDIR} -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") endif() -endmacro(add_cblas_test) +endmacro() # Object files for single real precision 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() diff --git a/CMakeLists.txt b/CMakeLists.txt index b32976f6..21cc5477 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -157,17 +157,17 @@ if(BLAS_LIBRARIES) unset( CMAKE_REQUIRED_LIBRARIES ) if(BLAS_FOUND) message(STATUS "--> BLAS supplied by user is WORKING, will use ${BLAS_LIBRARIES}.") - else(BLAS_FOUND) + else() message(ERROR "--> BLAS supplied by user is not WORKING, CANNOT USE ${BLAS_LIBRARIES}.") message(ERROR "--> Will use REFERENCE BLAS (by default)") message(ERROR "--> Or Correct your BLAS_LIBRARIES entry ") message(ERROR "--> Or Consider checking USE_OPTIMIZED_BLAS") - endif(BLAS_FOUND) + endif() # User did not provide a BLAS Library but specified to search for one elseif( USE_OPTIMIZED_BLAS ) find_package( BLAS ) -endif (BLAS_LIBRARIES) +endif () # Neither user specified or optimized BLAS libraries can be used if(NOT BLAS_FOUND) @@ -184,7 +184,7 @@ else() set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${BLAS_LINKER_FLAGS}" CACHE STRING "Linker flags for shared libs" FORCE) -endif( NOT BLAS_FOUND ) +endif() # -------------------------------------------------- @@ -193,7 +193,7 @@ option(CBLAS "Build CBLAS" OFF) if(CBLAS) add_subdirectory(CBLAS) -endif(CBLAS) +endif() # -------------------------------------------------- # XBLAS @@ -201,7 +201,7 @@ endif(CBLAS) option(USE_XBLAS "Build extended precision (needs XBLAS)" OFF) if (USE_XBLAS) find_library(XBLAS_LIBRARY NAMES xblas) -endif(USE_XBLAS) +endif() option(USE_OPTIMIZED_LAPACK "Whether or not to use an optimized LAPACK library instead of included netlib LAPACK" OFF) @@ -210,7 +210,7 @@ option(USE_OPTIMIZED_LAPACK "Whether or not to use an optimized LAPACK library i # User did not provide a LAPACK Library but specified to search for one if( USE_OPTIMIZED_LAPACK ) find_package( LAPACK ) -endif (USE_OPTIMIZED_LAPACK) +endif () # Check the usage of the user provided or automatically found LAPACK libraries if(LAPACK_LIBRARIES) @@ -221,13 +221,13 @@ if(LAPACK_LIBRARIES) unset( CMAKE_REQUIRED_LIBRARIES ) if(LATESTLAPACK_FOUND) message(STATUS "--> LAPACK supplied by user is WORKING, will use ${LAPACK_LIBRARIES}.") - else(LAPACK_FOUND) + else() message(ERROR "--> LAPACK supplied by user is not WORKING or is older than LAPACK 3.4.0, CANNOT USE ${LAPACK_LIBRARIES}.") message(ERROR "--> Will use REFERENCE LAPACK (by default)") message(ERROR "--> Or Correct your LAPACK_LIBRARIES entry ") message(ERROR "--> Or Consider checking USE_OPTIMIZED_LAPACK") - endif(LATESTLAPACK_FOUND) -endif (LAPACK_LIBRARIES) + endif() +endif () # Neither user specified or optimized LAPACK libraries can be used if(NOT LATESTLAPACK_FOUND) @@ -248,12 +248,12 @@ else() set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}" CACHE STRING "Linker flags for shared libs" FORCE) -endif( NOT LATESTLAPACK_FOUND ) +endif() message(STATUS "BUILD TESTING : ${BUILD_TESTING}" ) if(BUILD_TESTING) add_subdirectory(TESTING) -endif(BUILD_TESTING) +endif() # deprecated LAPACK routines option(BUILD_DEPRECATED "Build deprecated routines" OFF) @@ -269,12 +269,12 @@ if (LAPACKE_WITH_TMG) set(LAPACKE ON) if(NOT BUILD_TESTING) add_subdirectory(TESTING/MATGEN) - endif(NOT BUILD_TESTING) -endif(LAPACKE_WITH_TMG) + endif() +endif() if(LAPACKE) add_subdirectory(LAPACKE) -endif(LAPACKE) +endif() # -------------------------------------------------- # CPACK Packaging @@ -296,12 +296,12 @@ if(WIN32 AND NOT UNIX) set(CPACK_NSIS_MODIFY_PATH ON) set(CPACK_NSIS_DISPLAY_NAME "LAPACK-${LAPACK_VERSION}") set(CPACK_PACKAGE_RELOCATABLE "true") -else(WIN32 AND NOT UNIX) +else() set(CPACK_GENERATOR "TGZ") set(CPACK_SOURCE_GENERATOR TGZ) set(CPACK_SOURCE_PACKAGE_FILE_NAME "lapack-${LAPACK_VERSION}" ) set(CPACK_SOURCE_IGNORE_FILES ~$ .svn ${CPACK_SOURCE_IGNORE_FILES} ) -endif(WIN32 AND NOT UNIX) +endif() include(CPack) @@ -313,15 +313,15 @@ option(BUILD_STATIC_LIBS "Build static libraries" ON ) if(NOT BLAS_FOUND) set(ALL_TARGETS ${ALL_TARGETS} blas) -endif(NOT BLAS_FOUND) +endif() if(NOT LATESTLAPACK_FOUND) set(ALL_TARGETS ${ALL_TARGETS} lapack) -endif(NOT LATESTLAPACK_FOUND) +endif() if(BUILD_TESTING OR LAPACKE_WITH_TMG) set(ALL_TARGETS ${ALL_TARGETS} tmglib) -endif(BUILD_TESTING OR LAPACKE_WITH_TMG) +endif() # Export lapack targets, not including lapacke, from the # install tree, if any. @@ -338,12 +338,12 @@ endif() # Include cblas in targets exported from the build tree. if(CBLAS) set(ALL_TARGETS ${ALL_TARGETS} cblas) -endif(CBLAS) +endif() # Include lapacke in targets exported from the build tree. if(LAPACKE) set(ALL_TARGETS ${ALL_TARGETS} lapacke) -endif(LAPACKE) +endif() # Export lapack and lapacke targets from the build tree, if any. set(_lapack_config_build_guard_target "") diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt index 737700f3..164ae15f 100644 --- a/LAPACKE/CMakeLists.txt +++ b/LAPACKE/CMakeLists.txt @@ -19,7 +19,7 @@ endif () if (WIN32 AND NOT UNIX) add_definitions(-DHAVE_LAPACK_CONFIG_H -DLAPACK_COMPLEX_STRUCTURE) message (STATUS "Windows BUILD") -endif (WIN32 AND NOT UNIX) +endif () get_directory_property( DirDefs COMPILE_DEFINITIONS ) @@ -44,22 +44,22 @@ append_subdir_files(UTILS_OBJ "utils") if (USE_XBLAS) add_library(lapacke ${SRC_OBJ} ${SRCX_OBJ} ${UTILS_OBJ}) target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${XBLAS_LIBRARY}) -else (USE_XBLAS) +else () if (LAPACKE_WITH_TMG) add_library(lapacke ${SRC_OBJ} ${MATGEN_OBJ} ${UTILS_OBJ}) target_link_libraries(lapacke tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) - else (LAPACKE_WITH_TMG) + else () add_library(lapacke ${SRC_OBJ} ${UTILS_OBJ}) target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) - endif(LAPACKE_WITH_TMG) -endif(USE_XBLAS) + endif() +endif() lapack_install_library(lapacke) install( FILES ${LAPACKE_INCLUDE} ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h DESTINATION include ) if(BUILD_TESTING) add_subdirectory(example) -endif(BUILD_TESTING) +endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc) diff --git a/TESTING/CMakeLists.txt b/TESTING/CMakeLists.txt index b7e5db97..2d587376 100644 --- a/TESTING/CMakeLists.txt +++ b/TESTING/CMakeLists.txt @@ -20,7 +20,7 @@ macro(add_lapack_test output input target) -DINTDIR=${CMAKE_CFG_INTDIR} -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") endif() -endmacro(add_lapack_test) +endmacro() if (BUILD_SINGLE) add_lapack_test(stest.out stest.in xlintsts) diff --git a/TESTING/EIG/CMakeLists.txt b/TESTING/EIG/CMakeLists.txt index 612bf1f3..b6bc77d6 100644 --- a/TESTING/EIG/CMakeLists.txt +++ b/TESTING/EIG/CMakeLists.txt @@ -120,7 +120,7 @@ set(ZEIGTST zchkee.f macro(add_eig_executable name ) add_executable(${name} ${ARGN}) target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES}) -endmacro(add_eig_executable) +endmacro() if (BUILD_SINGLE) add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST} diff --git a/TESTING/LIN/CMakeLists.txt b/TESTING/LIN/CMakeLists.txt index beb6ac61..a924b12f 100644 --- a/TESTING/LIN/CMakeLists.txt +++ b/TESTING/LIN/CMakeLists.txt @@ -194,7 +194,7 @@ set(ZLINTSTRFP zchkrfp.f zdrvrfp.f zdrvrf1.f zdrvrf2.f zdrvrf3.f zdrvrf4.f zerr macro(add_lin_executable name ) add_executable(${name} ${ARGN}) target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES}) -endmacro(add_lin_executable) +endmacro() if(BUILD_SINGLE) add_lin_executable(xlintsts ${ALINTST} ${SCLNTST} ${SLINTST} ${SECOND_SRC} ) diff --git a/lapack_build.cmake b/lapack_build.cmake index 404ebd74..a9012b3b 100644 --- a/lapack_build.cmake +++ b/lapack_build.cmake @@ -5,14 +5,14 @@ cmake_minimum_required(VERSION 2.8.7) if(UNIX) if(NOT compiler) set(compiler gcc) - endif(NOT compiler) + endif() if(NOT c_compiler) set(c_compiler gcc) - endif(NOT c_compiler) + endif() if(NOT full_compiler) set(full_compiler g++) - endif(NOT full_compiler) -endif(UNIX) + endif() +endif() if(EXISTS "/proc/cpuinfo") set(parallel 1) @@ -21,7 +21,7 @@ if(EXISTS "/proc/cpuinfo") if("${line}" MATCHES processor) math(EXPR parallel "${parallel} + 1") endif() - endforeach(line) + endforeach() endif() if(WIN32) @@ -57,7 +57,7 @@ if(WIN32) set(CTEST_CMAKE_GENERATOR "${GENERATOR}") message("${CTEST_CMAKE_GENERATOR} - found") set(compiler cl) -endif(WIN32) +endif() find_program(HOSTNAME NAMES hostname) find_program(UNAME NAMES uname) @@ -70,7 +70,7 @@ message("HOSTNAME: ${hostname}") # default to parallel 1 if(NOT DEFINED parallel) set(parallel 1) -endif(NOT DEFINED parallel) +endif() # find CVS find_program(SVN svn PATHS $ENV{HOME}/bin /vol/local/bin) @@ -83,7 +83,7 @@ macro(getuname name flag) exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}") string(REGEX REPLACE "[/\\\\+<> #]" "-" "${name}" "${${name}}") string(REGEX REPLACE "^(......|.....|....|...|..|.).*" "\\1" "${name}" "${${name}}") -endmacro(getuname) +endmacro() getuname(osname -s) getuname(osver -v) @@ -97,12 +97,12 @@ if("${osname}" MATCHES Darwin) set(osrel "") if("${cpu}" MATCHES "Power") set(cpu "ppc") - endif("${cpu}" MATCHES "Power") -endif("${osname}" MATCHES Darwin) + endif() +endif() if(NOT compiler) message(FATAL_ERROR "compiler must be set") -endif(NOT compiler) +endif() set(BUILDNAME "${osname}${osver}${osrel}${cpu}-${compiler}") @@ -116,9 +116,9 @@ set (CTEST_DIR_NAME "${CTEST_MODULE_NAME}SVN") message("NOSPACES = ${NOSPACES}") if(NOSPACES) set(CTEST_DASHBOARD_ROOT "$ENV{HOME}/Dashboards/MyTests-${BUILDNAME}") -else(NOSPACES) +else() set(CTEST_DASHBOARD_ROOT "$ENV{HOME}/Dashboards/My Tests-${BUILDNAME}") -endif(NOSPACES) +endif() set(CTEST_SITE "${hostname}") set(CTEST_BUILD_NAME "${BUILDNAME}") set(CTEST_TEST_TIMEOUT "36000") @@ -127,12 +127,12 @@ set(CTEST_TEST_TIMEOUT "36000") if(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${CTEST_DIR_NAME}") set(CTEST_CHECKOUT_COMMAND "\"${CTEST_UPDATE_COMMAND}\" co https://icl.cs.utk.edu/svn/lapack-dev/lapack/trunk ${CTEST_DIR_NAME}") -endif(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${CTEST_DIR_NAME}") +endif() # Set the generator and build configuration if(NOT DEFINED CTEST_CMAKE_GENERATOR) set(CTEST_CMAKE_GENERATOR "Unix Makefiles") -endif(NOT DEFINED CTEST_CMAKE_GENERATOR) +endif() set(CTEST_PROJECT_NAME "LAPACK") set(CTEST_BUILD_CONFIGURATION "Release") @@ -142,7 +142,7 @@ if(CTEST_CMAKE_GENERATOR MATCHES Makefiles) set(ENV{CC} "${c_compiler}") set(ENV{FC} "${f_compiler}") set(ENV{CXX} "${full_compiler}") -endif(CTEST_CMAKE_GENERATOR MATCHES Makefiles) +endif() #---------------------------------------------------------------------------------- # Should not need to edit under this line @@ -164,12 +164,12 @@ set(CTEST_NOTES_FILES "${CTEST_NOTES_FILES}" if(parallel GREATER 10) if(NOT CTEST_BUILD_COMMAND) set(CTEST_BUILD_COMMAND "make -j${parallel} -i") - endif(NOT CTEST_BUILD_COMMAND) + endif() message("Use parallel build") message("CTEST_BUILD_COMMAND: ${CTEST_BUILD_COMMAND}") message("CTEST_CONFIGURE_COMMAND: ${CTEST_CONFIGURE_COMMAND}") -endif(parallel GREATER 10) +endif() ################################################################### # Values for the cmake build |