summaryrefslogtreecommitdiffstats
path: root/Modules/FindGettext.cmake
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:50:14 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:19:16 (GMT)
commit9db3116226cb99fcf54e936c833953abcde9b729 (patch)
treebd755ed9e616bbf1482a894bc7946980d81b7703 /Modules/FindGettext.cmake
parent77543bde41b0e52c3959016698b529835945d62d (diff)
downloadCMake-9db3116226cb99fcf54e936c833953abcde9b729.zip
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.gz
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.bz2
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. 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' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
Diffstat (limited to 'Modules/FindGettext.cmake')
-rw-r--r--Modules/FindGettext.cmake34
1 files changed, 17 insertions, 17 deletions
diff --git a/Modules/FindGettext.cmake b/Modules/FindGettext.cmake
index a801a29..c4774d9 100644
--- a/Modules/FindGettext.cmake
+++ b/Modules/FindGettext.cmake
@@ -52,7 +52,7 @@ if(GETTEXT_MSGMERGE_EXECUTABLE)
string(REGEX REPLACE "^msgmerge \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*" "\\1" GETTEXT_VERSION_STRING "${gettext_version}")
endif()
unset(gettext_version)
-endif(GETTEXT_MSGMERGE_EXECUTABLE)
+endif()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gettext
@@ -85,7 +85,7 @@ macro(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg)
if(${_firstPoFile} STREQUAL "ALL")
set(_addToAll "ALL")
set(_firstPoFile)
- endif(${_firstPoFile} STREQUAL "ALL")
+ endif()
foreach (_currentPoFile ${_firstPoFile} ${ARGN})
get_filename_component(_absFile ${_currentPoFile} ABSOLUTE)
@@ -103,7 +103,7 @@ macro(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg)
install(FILES ${_gmoFile} DESTINATION share/locale/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
set(_gmoFiles ${_gmoFiles} ${_gmoFile})
- endforeach (_currentPoFile )
+ endforeach ()
if(NOT TARGET translations)
add_custom_target(translations)
@@ -115,7 +115,7 @@ macro(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg)
add_dependencies(translations ${uniqueTargetName})
-endmacro(GETTEXT_CREATE_TRANSLATIONS )
+endmacro()
function(GETTEXT_PROCESS_POT_FILE _potFile)
@@ -148,9 +148,9 @@ function(GETTEXT_PROCESS_POT_FILE _potFile)
if(_parsedArguments_INSTALL_DESTINATION)
install(FILES ${_gmoFile} DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
- endif(_parsedArguments_INSTALL_DESTINATION)
+ endif()
list(APPEND _gmoFiles ${_gmoFile})
- endforeach (_lang )
+ endforeach ()
if(NOT TARGET potfiles)
add_custom_target(potfiles)
@@ -160,13 +160,13 @@ function(GETTEXT_PROCESS_POT_FILE _potFile)
if(_parsedArguments_ALL)
add_custom_target(${uniqueTargetName} ALL DEPENDS ${_gmoFiles})
- else(_parsedArguments_ALL)
+ else()
add_custom_target(${uniqueTargetName} DEPENDS ${_gmoFiles})
- endif(_parsedArguments_ALL)
+ endif()
add_dependencies(potfiles ${uniqueTargetName})
-endfunction(GETTEXT_PROCESS_POT_FILE)
+endfunction()
function(GETTEXT_PROCESS_PO_FILES _lang)
@@ -189,9 +189,9 @@ function(GETTEXT_PROCESS_PO_FILES _lang)
if(_parsedArguments_INSTALL_DESTINATION)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES/ RENAME ${_basename}.mo)
- endif(_parsedArguments_INSTALL_DESTINATION)
+ endif()
list(APPEND _gmoFiles ${_gmoFile})
- endforeach(_current_PO_FILE)
+ endforeach()
if(NOT TARGET pofiles)
@@ -202,19 +202,19 @@ function(GETTEXT_PROCESS_PO_FILES _lang)
if(_parsedArguments_ALL)
add_custom_target(${uniqueTargetName} ALL DEPENDS ${_gmoFiles})
- else(_parsedArguments_ALL)
+ else()
add_custom_target(${uniqueTargetName} DEPENDS ${_gmoFiles})
- endif(_parsedArguments_ALL)
+ endif()
add_dependencies(pofiles ${uniqueTargetName})
-endfunction(GETTEXT_PROCESS_PO_FILES)
+endfunction()
if (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
set(GETTEXT_FOUND TRUE)
-else (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
+else ()
set(GETTEXT_FOUND FALSE)
if (GetText_REQUIRED)
message(FATAL_ERROR "GetText not found")
- endif (GetText_REQUIRED)
-endif (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
+ endif ()
+endif ()