Skip to content

Commit 5333ddd

Browse files
committed
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
1 parent b1e0d47 commit 5333ddd

13 files changed

+64
-64
lines changed

BLAS/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
add_subdirectory(SRC)
22
if(BUILD_TESTING)
33
add_subdirectory(TESTING)
4-
endif(BUILD_TESTING)
4+
endif()
55
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc)
66
install(FILES
77
${CMAKE_CURRENT_BINARY_DIR}/blas.pc

BLAS/TESTING/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ macro(add_blas_test name src)
4343
-DINTDIR=${CMAKE_CFG_INTDIR}
4444
-P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
4545
endif()
46-
endmacro(add_blas_test)
46+
endmacro()
4747

4848
if(BUILD_SINGLE)
4949
add_blas_test(xblat1s sblat1.f)

CBLAS/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ install( FILES ${CBLAS_INCLUDE} ${LAPACK_BINARY_DIR}/include/cblas_mangling.h DE
3434
if(BUILD_TESTING)
3535
add_subdirectory(testing)
3636
add_subdirectory(examples)
37-
endif(BUILD_TESTING)
37+
endif()
3838

3939
if(NOT BLAS_FOUND)
4040
set(ALL_TARGETS ${ALL_TARGETS} blas)
41-
endif(NOT BLAS_FOUND)
41+
endif()
4242

4343
# Export cblas targets from the
4444
# install tree, if any.

CBLAS/src/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,22 @@ set(ALLOBJ ${SCLEV1} ${SLEV1} ${SLEV2} ${SLEV3} ${ERRHAND}
146146
# Single real precision
147147
if(CBLAS_SINGLE)
148148
set(ALLOBJ ${SCLEV1} ${SLEV1} ${SLEV2} ${SLEV3} ${ERRHAND})
149-
endif(CBLAS_SINGLE)
149+
endif()
150150

151151
# Double real precision
152152
if(CBLAS_DOUBLE)
153153
set(ALLOBJ ${DLEV1} ${DLEV2} ${DLEV3} ${ERRHAND})
154-
endif(CBLAS_DOUBLE)
154+
endif()
155155

156156
# Single complex precision
157157
if (CBLAS_COMPLEX)
158158
set(ALLOBJ ${CLEV1} ${SCLEV1} ${CLEV2} ${CLEV3} ${ERRHAND})
159-
endif(CBLAS_COMPLEX)
159+
endif()
160160

161161
# Double complex precision
162162
if (CBLAS_COMPLEX16)
163163
set(ALLOBJ ${ZLEV1} ${ZLEV2} ${ZLEV3} ${ERRHAND})
164-
endif(CBLAS_COMPLEX16)
164+
endif()
165165

166166
add_library(cblas ${ALLOBJ})
167167
target_link_libraries(cblas ${BLAS_LIBRARIES} )

CBLAS/testing/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ macro(add_cblas_test output input target)
2222
-DINTDIR=${CMAKE_CFG_INTDIR}
2323
-P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
2424
endif()
25-
endmacro(add_cblas_test)
25+
endmacro()
2626

2727

2828
# Object files for single real precision

CMAKE/CheckTimeFunction.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ macro(CHECK_TIME_FUNCTION FUNCTION VARIABLE)
1818
message(STATUS "Looking for Fortran ${FUNCTION} - found")
1919
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
2020
"Fortran ${FUNCTION} exists. ${OUTPUT} \n\n")
21-
else(RES)
21+
else()
2222
message(STATUS "Looking for Fortran ${FUNCTION} - not found")
2323
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
2424
"Fortran ${FUNCTION} does not exist. \n ${OUTPUT} \n")
25-
endif(RES)
26-
endmacro(CHECK_TIME_FUNCTION)
25+
endif()
26+
endmacro()
2727

2828

CMAKE/FortranMangling.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ message(STATUS "=========")
2323
"Fortran compiler option for setting object file name.")
2424
set(F77_OUTPUT_EXE "/Fe" CACHE INTERNAL
2525
"Fortran compiler option for setting executable file name.")
26-
else(${F77} STREQUAL "ifort.exe")
26+
else()
2727
# in other case, let user specify their fortran configrations.
2828
set(F77_OPTION_COMPILE "-c" CACHE STRING
2929
"Fortran compiler option for compiling without linking.")
@@ -35,7 +35,7 @@ message(STATUS "=========")
3535
"Library path for the fortran compiler")
3636
set(F77_INCLUDE_PATH "" CACHE PATH
3737
"Include path for the fortran compiler")
38-
endif(${F77} STREQUAL "ifort.exe")
38+
endif()
3939

4040

4141
message(STATUS "Testing FORTRAN_MANGLING")
@@ -102,4 +102,4 @@ message(STATUS "Running ./xintface...")
102102
message(FATAL_ERROR "FORTRAN_MANGLING:ERROR ${xintface_ERR}")
103103
endif()
104104

105-
endmacro(FORTRAN_MANGLING)
105+
endmacro()

CMakeLists.txt

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,17 @@ if(BLAS_LIBRARIES)
157157
unset( CMAKE_REQUIRED_LIBRARIES )
158158
if(BLAS_FOUND)
159159
message(STATUS "--> BLAS supplied by user is WORKING, will use ${BLAS_LIBRARIES}.")
160-
else(BLAS_FOUND)
160+
else()
161161
message(ERROR "--> BLAS supplied by user is not WORKING, CANNOT USE ${BLAS_LIBRARIES}.")
162162
message(ERROR "--> Will use REFERENCE BLAS (by default)")
163163
message(ERROR "--> Or Correct your BLAS_LIBRARIES entry ")
164164
message(ERROR "--> Or Consider checking USE_OPTIMIZED_BLAS")
165-
endif(BLAS_FOUND)
165+
endif()
166166

167167
# User did not provide a BLAS Library but specified to search for one
168168
elseif( USE_OPTIMIZED_BLAS )
169169
find_package( BLAS )
170-
endif (BLAS_LIBRARIES)
170+
endif ()
171171

172172
# Neither user specified or optimized BLAS libraries can be used
173173
if(NOT BLAS_FOUND)
@@ -184,7 +184,7 @@ else()
184184
set( CMAKE_SHARED_LINKER_FLAGS
185185
"${CMAKE_SHARED_LINKER_FLAGS} ${BLAS_LINKER_FLAGS}"
186186
CACHE STRING "Linker flags for shared libs" FORCE)
187-
endif( NOT BLAS_FOUND )
187+
endif()
188188

189189

190190
# --------------------------------------------------
@@ -193,15 +193,15 @@ option(CBLAS "Build CBLAS" OFF)
193193

194194
if(CBLAS)
195195
add_subdirectory(CBLAS)
196-
endif(CBLAS)
196+
endif()
197197

198198
# --------------------------------------------------
199199
# XBLAS
200200

201201
option(USE_XBLAS "Build extended precision (needs XBLAS)" OFF)
202202
if (USE_XBLAS)
203203
find_library(XBLAS_LIBRARY NAMES xblas)
204-
endif(USE_XBLAS)
204+
endif()
205205

206206
option(USE_OPTIMIZED_LAPACK "Whether or not to use an optimized LAPACK library instead of included netlib LAPACK" OFF)
207207

@@ -210,7 +210,7 @@ option(USE_OPTIMIZED_LAPACK "Whether or not to use an optimized LAPACK library i
210210
# User did not provide a LAPACK Library but specified to search for one
211211
if( USE_OPTIMIZED_LAPACK )
212212
find_package( LAPACK )
213-
endif (USE_OPTIMIZED_LAPACK)
213+
endif ()
214214

215215
# Check the usage of the user provided or automatically found LAPACK libraries
216216
if(LAPACK_LIBRARIES)
@@ -221,13 +221,13 @@ if(LAPACK_LIBRARIES)
221221
unset( CMAKE_REQUIRED_LIBRARIES )
222222
if(LATESTLAPACK_FOUND)
223223
message(STATUS "--> LAPACK supplied by user is WORKING, will use ${LAPACK_LIBRARIES}.")
224-
else(LAPACK_FOUND)
224+
else()
225225
message(ERROR "--> LAPACK supplied by user is not WORKING or is older than LAPACK 3.4.0, CANNOT USE ${LAPACK_LIBRARIES}.")
226226
message(ERROR "--> Will use REFERENCE LAPACK (by default)")
227227
message(ERROR "--> Or Correct your LAPACK_LIBRARIES entry ")
228228
message(ERROR "--> Or Consider checking USE_OPTIMIZED_LAPACK")
229-
endif(LATESTLAPACK_FOUND)
230-
endif (LAPACK_LIBRARIES)
229+
endif()
230+
endif ()
231231

232232
# Neither user specified or optimized LAPACK libraries can be used
233233
if(NOT LATESTLAPACK_FOUND)
@@ -248,12 +248,12 @@ else()
248248
set( CMAKE_SHARED_LINKER_FLAGS
249249
"${CMAKE_SHARED_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}"
250250
CACHE STRING "Linker flags for shared libs" FORCE)
251-
endif( NOT LATESTLAPACK_FOUND )
251+
endif()
252252

253253
message(STATUS "BUILD TESTING : ${BUILD_TESTING}" )
254254
if(BUILD_TESTING)
255255
add_subdirectory(TESTING)
256-
endif(BUILD_TESTING)
256+
endif()
257257

258258
# deprecated LAPACK routines
259259
option(BUILD_DEPRECATED "Build deprecated routines" OFF)
@@ -269,12 +269,12 @@ if (LAPACKE_WITH_TMG)
269269
set(LAPACKE ON)
270270
if(NOT BUILD_TESTING)
271271
add_subdirectory(TESTING/MATGEN)
272-
endif(NOT BUILD_TESTING)
273-
endif(LAPACKE_WITH_TMG)
272+
endif()
273+
endif()
274274

275275
if(LAPACKE)
276276
add_subdirectory(LAPACKE)
277-
endif(LAPACKE)
277+
endif()
278278

279279
# --------------------------------------------------
280280
# CPACK Packaging
@@ -296,12 +296,12 @@ if(WIN32 AND NOT UNIX)
296296
set(CPACK_NSIS_MODIFY_PATH ON)
297297
set(CPACK_NSIS_DISPLAY_NAME "LAPACK-${LAPACK_VERSION}")
298298
set(CPACK_PACKAGE_RELOCATABLE "true")
299-
else(WIN32 AND NOT UNIX)
299+
else()
300300
set(CPACK_GENERATOR "TGZ")
301301
set(CPACK_SOURCE_GENERATOR TGZ)
302302
set(CPACK_SOURCE_PACKAGE_FILE_NAME "lapack-${LAPACK_VERSION}" )
303303
set(CPACK_SOURCE_IGNORE_FILES ~$ .svn ${CPACK_SOURCE_IGNORE_FILES} )
304-
endif(WIN32 AND NOT UNIX)
304+
endif()
305305
include(CPack)
306306

307307

@@ -313,15 +313,15 @@ option(BUILD_STATIC_LIBS "Build static libraries" ON )
313313

314314
if(NOT BLAS_FOUND)
315315
set(ALL_TARGETS ${ALL_TARGETS} blas)
316-
endif(NOT BLAS_FOUND)
316+
endif()
317317

318318
if(NOT LATESTLAPACK_FOUND)
319319
set(ALL_TARGETS ${ALL_TARGETS} lapack)
320-
endif(NOT LATESTLAPACK_FOUND)
320+
endif()
321321

322322
if(BUILD_TESTING OR LAPACKE_WITH_TMG)
323323
set(ALL_TARGETS ${ALL_TARGETS} tmglib)
324-
endif(BUILD_TESTING OR LAPACKE_WITH_TMG)
324+
endif()
325325

326326
# Export lapack targets, not including lapacke, from the
327327
# install tree, if any.
@@ -338,12 +338,12 @@ endif()
338338
# Include cblas in targets exported from the build tree.
339339
if(CBLAS)
340340
set(ALL_TARGETS ${ALL_TARGETS} cblas)
341-
endif(CBLAS)
341+
endif()
342342

343343
# Include lapacke in targets exported from the build tree.
344344
if(LAPACKE)
345345
set(ALL_TARGETS ${ALL_TARGETS} lapacke)
346-
endif(LAPACKE)
346+
endif()
347347

348348
# Export lapack and lapacke targets from the build tree, if any.
349349
set(_lapack_config_build_guard_target "")

LAPACKE/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ endif ()
1919
if (WIN32 AND NOT UNIX)
2020
add_definitions(-DHAVE_LAPACK_CONFIG_H -DLAPACK_COMPLEX_STRUCTURE)
2121
message (STATUS "Windows BUILD")
22-
endif (WIN32 AND NOT UNIX)
22+
endif ()
2323

2424
get_directory_property( DirDefs COMPILE_DEFINITIONS )
2525

@@ -44,22 +44,22 @@ append_subdir_files(UTILS_OBJ "utils")
4444
if (USE_XBLAS)
4545
add_library(lapacke ${SRC_OBJ} ${SRCX_OBJ} ${UTILS_OBJ})
4646
target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${XBLAS_LIBRARY})
47-
else (USE_XBLAS)
47+
else ()
4848
if (LAPACKE_WITH_TMG)
4949
add_library(lapacke ${SRC_OBJ} ${MATGEN_OBJ} ${UTILS_OBJ})
5050
target_link_libraries(lapacke tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
51-
else (LAPACKE_WITH_TMG)
51+
else ()
5252
add_library(lapacke ${SRC_OBJ} ${UTILS_OBJ})
5353
target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
54-
endif(LAPACKE_WITH_TMG)
55-
endif(USE_XBLAS)
54+
endif()
55+
endif()
5656

5757
lapack_install_library(lapacke)
5858
install( FILES ${LAPACKE_INCLUDE} ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h DESTINATION include )
5959

6060
if(BUILD_TESTING)
6161
add_subdirectory(example)
62-
endif(BUILD_TESTING)
62+
endif()
6363

6464

6565
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc)

TESTING/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ macro(add_lapack_test output input target)
2020
-DINTDIR=${CMAKE_CFG_INTDIR}
2121
-P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
2222
endif()
23-
endmacro(add_lapack_test)
23+
endmacro()
2424

2525
if (BUILD_SINGLE)
2626
add_lapack_test(stest.out stest.in xlintsts)

TESTING/EIG/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ set(ZEIGTST zchkee.f
120120
macro(add_eig_executable name )
121121
add_executable(${name} ${ARGN})
122122
target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES})
123-
endmacro(add_eig_executable)
123+
endmacro()
124124

125125
if (BUILD_SINGLE)
126126
add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST}

TESTING/LIN/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ set(ZLINTSTRFP zchkrfp.f zdrvrfp.f zdrvrf1.f zdrvrf2.f zdrvrf3.f zdrvrf4.f zerr
194194
macro(add_lin_executable name )
195195
add_executable(${name} ${ARGN})
196196
target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES})
197-
endmacro(add_lin_executable)
197+
endmacro()
198198

199199
if(BUILD_SINGLE)
200200
add_lin_executable(xlintsts ${ALINTST} ${SCLNTST} ${SLINTST} ${SECOND_SRC} )

0 commit comments

Comments
 (0)