Skip to content

Commit ad5f561

Browse files
committed
STYLE: 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. Change-Id: Idcf8fde33ba4ac2cf6a768bcf780007dfa0cbe35
1 parent e6fa9cd commit ad5f561

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

Diff for: ITKSoftwareGuide.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ include(${ITK_USE_FILE})
1919

2020
if( NOT IS_DIRECTORY "${ITK_SOURCE_DIR}" )
2121
message(FATAL_ERROR "ITK source directory is not set :${ITK_SOURCE_DIR}:")
22-
endif( )
22+
endif()
2323
if( NOT IS_DIRECTORY "${ITK_BINARY_DIR}" )
2424
message(FATAL_ERROR "ITK build directory is not set :${ITK_BINARY_DIR}:")
25-
endif( )
25+
endif()
2626

2727
#-----------------------------------------------------------------------------
2828
enable_testing()

Diff for: SoftwareGuide/Art/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ foreach(ImageFile ${PNGandJPG_IMAGES})
3838
DEPENDS ${ImageFile}
3939
)
4040
set(EPS_DEPS ${EPS_DEPS} ${SoftwareGuide_BINARY_DIR}/Art/${ImageFileNoExt}.eps)
41-
endforeach(ImageFile)
41+
endforeach()
4242

4343

4444
foreach(ImageFile ${EPS_IMAGES})
4545
get_filename_component(ImageFileNoExt ${ImageFile} NAME_WE)
4646
file(COPY "${SoftwareGuide_SOURCE_DIR}/Art/${ImageFileNoExt}.eps"
4747
DESTINATION "${SoftwareGuide_BINARY_DIR}/Art/")
4848
set(EPS_DEPS ${EPS_DEPS} ${SoftwareGuide_BINARY_DIR}/Art/${ImageFileNoExt}.eps)
49-
endforeach(ImageFile)
49+
endforeach()
5050

5151
add_custom_target(SoftwareGuideArt
5252
ALL

Diff for: SoftwareGuide/Examples/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ endif()
4949
find_package(PythonInterp)
5050
if( NOT PYTHONINTERP_FOUND )
5151
message(FATAL_ERROR "Python executable was not found")
52-
endif( NOT PYTHONINTERP_FOUND )
52+
endif()
5353
set(PYTHONCXXPARSER ${SoftwareGuide_SOURCE_DIR}/Examples/ParseCxxExamples.py)
5454
if( NOT EXISTS ${PYTHONCXXPARSER} )
5555
message(FATAL_ERROR "Missing script: ${SoftwareGuide_SOURCE_DIR}/Examples/ParseCxxExamples.py")
@@ -305,7 +305,7 @@ foreach(example ${ITK_EXAMPLES_SRCS})
305305
DEPENDS ${PYTHONCXXPARSER} ${example} ${${TEX_FILE_BASE}-DEPS}
306306
)
307307
set(TEX_DEPENDENCIES ${TEX_DEPENDENCIES} ${TEX_FILE})
308-
endforeach(example)
308+
endforeach()
309309

310310
add_custom_target(BuildTexFiles ALL
311311
DEPENDS ${TEX_DEPENDENCIES}

Diff for: SoftwareGuide/Latex/CMakeLists.txt

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ find_package(LATEX)
88
#
99
if(NOT PDFLATEX_COMPILER)
1010
message("PDFLatex compiler was not found. Please pass to advanced mode and provide its full path")
11-
endif(NOT PDFLATEX_COMPILER)
11+
endif()
1212

1313
if(NOT LATEX_COMPILER)
1414
message("Latex compiler was not found. Please pass to advanced mode and provide its full path")
15-
endif(NOT LATEX_COMPILER)
15+
endif()
1616

1717
if(NOT BIBTEX_COMPILER)
1818
message("BibTeX executable was not found. Please pass to advanced mode and provide its full path")
19-
endif(NOT BIBTEX_COMPILER)
19+
endif()
2020

2121
if(NOT DVIPS_CONVERTER)
2222
message("dvips executable was not found. Please pass to advanced mode and provide its full path")
23-
endif(NOT DVIPS_CONVERTER)
23+
endif()
2424

2525
if(NOT PS2PDF_CONVERTER)
2626
message("ps2pdf executable was not found. Please pass to advanced mode and provide its full path")
27-
endif(NOT PS2PDF_CONVERTER)
27+
endif()
2828

2929
if(NOT MAKEINDEX_COMPILER)
3030
message("makeindex executable was not found. Please pass to advanced mode and provide its full path")
31-
endif(NOT MAKEINDEX_COMPILER)
31+
endif()
3232

3333
#
3434
# Build HTML version
@@ -146,7 +146,7 @@ if(LATEX_COMPILER)
146146
${SoftwareGuide_BINARY_DIR}/DvipsWrapper.bat)
147147
set(DVIPS_WRAPPER1 ${SoftwareGuide_BINARY_DIR}/DvipsWrapper.bat)
148148
set(DVIPS_WRAPPER2 "")
149-
else(NOT UNIX)
149+
else()
150150
set(ITK_TEXINPUTS ${SoftwareGuide_SOURCE_DIR}/../Latex:${SoftwareGuide_SOURCE_DIR}:${SoftwareGuide_SOURCE_DIR}/Latex:${SoftwareGuide_SOURCE_DIR}/Art:${SoftwareGuide_BINARY_DIR}:${SoftwareGuide_BINARY_DIR}/Examples:${SoftwareGuide_BINARY_DIR}/Art:${SoftwareGuide_BINARY_DIR}/Latex)
151151

152152
configure_file(${SoftwareGuide_SOURCE_DIR}/LaTeXWrapper.sh.in
@@ -158,7 +158,7 @@ if(LATEX_COMPILER)
158158
${SoftwareGuide_BINARY_DIR}/DvipsWrapper.sh)
159159
set(DVIPS_WRAPPER1 /bin/sh)
160160
set(DVIPS_WRAPPER2 ${SoftwareGuide_BINARY_DIR}/DvipsWrapper.sh)
161-
endif(NOT UNIX)
161+
endif()
162162

163163
add_custom_command( OUTPUT ITKSoftwareGuide-Book1.dvi ITKSoftwareGuide-Book1.aux
164164
COMMAND ${LATEX_WRAPPER1} ${LATEX_WRAPPER2} ${SoftwareGuide_SOURCE_DIR}/Latex/ITKSoftwareGuide-Book1.tex
@@ -266,7 +266,7 @@ if(LATEX_COMPILER)
266266
)
267267
endif()
268268

269-
endif(LATEX_COMPILER)
269+
endif()
270270

271271
add_custom_target(SoftwareGuideBook1PDF ALL
272272
COMMAND ${CMAKE_COMMAND} -E echo "Building Software Guide Book1 PDF"

0 commit comments

Comments
 (0)