Browse Source

Remove text between parentheses in "else()", "endif()" and "endforeach()". See #79

The following script allowed to automatize the work:

#!/bin/sh

for file in $(find . -type f -name '*\.cmake' -o -name '*\.txt' -o -name '*\.ctest')
do
  echo "Processing file [$file]"

  sed -i "s/endif(.*)/endif()/gI" $file
  sed -i "s/else(.*)/else()/gI" $file
  sed -i "s/endforeach(.*)/endforeach()/gI" $file
done
Jean-Christophe Fillion-Robin 13 years ago
parent
commit
fad20d0f1c
53 changed files with 91 additions and 91 deletions
  1. 1 1
      Applications/Testing/Cpp/CMakeLists.txt
  2. 1 1
      Applications/ctkCLIPluginExplorer/CMakeLists.txt
  3. 1 1
      Applications/ctkDICOM/CMakeLists.txt
  4. 1 1
      Applications/ctkDICOM/Testing/Cpp/CMakeLists.txt
  5. 1 1
      Applications/ctkDICOMDemoSCU/CMakeLists.txt
  6. 1 1
      Applications/ctkDICOMDemoSCU/Testing/Cpp/CMakeLists.txt
  7. 1 1
      Applications/ctkDICOMIndexer/CMakeLists.txt
  8. 1 1
      Applications/ctkDICOMIndexer/Testing/Cpp/CMakeLists.txt
  9. 1 1
      Applications/ctkDICOMObjectViewer/CMakeLists.txt
  10. 1 1
      Applications/ctkDICOMQuery/CMakeLists.txt
  11. 1 1
      Applications/ctkDICOMQueryRetrieve/CMakeLists.txt
  12. 1 1
      Applications/ctkDICOMQueryRetrieve/Testing/Cpp/CMakeLists.txt
  13. 1 1
      Applications/ctkDICOMRetrieve/CMakeLists.txt
  14. 1 1
      Applications/ctkEventBusDemo/CMakeLists.txt
  15. 1 1
      Applications/ctkExampleHost/CMakeLists.txt
  16. 1 1
      Applications/ctkExampleHostedApp/CMakeLists.txt
  17. 1 1
      Applications/ctkPluginBrowser/CMakeLists.txt
  18. 1 1
      Applications/ctkPluginGenerator/CMakeLists.txt
  19. 1 1
      Applications/ctkSimplePythonShell/CMakeLists.txt
  20. 1 1
      CMake/ctkFunctionApplyPatches.cmake
  21. 7 7
      CMake/ctkFunctionCMakeDoxygenFilterCompile.cmake
  22. 1 1
      CMake/ctkMacroBuildLib.cmake
  23. 8 8
      CMake/ctkMacroListFilter.cmake
  24. 3 3
      CMake/ctkMacroParseArguments.cmake
  25. 2 2
      CMake/ctkMacroSetupQt.cmake
  26. 1 1
      CMake/ctkMacroWrapPythonQt.cmake
  27. 1 1
      CMakeLists.txt
  28. 3 3
      Documentation/CMakeLists.txt
  29. 1 1
      Libs/Core/CMakeLists.txt
  30. 1 1
      Libs/DICOM/Core/CMakeLists.txt
  31. 1 1
      Libs/DICOM/Widgets/CMakeLists.txt
  32. 1 1
      Libs/ImageProcessing/ITK/Core/CMakeLists.txt
  33. 1 1
      Libs/Messaging/Core/CMakeLists.txt
  34. 1 1
      Libs/ModuleDescription/CMakeLists.txt
  35. 1 1
      Libs/PluginFramework/CMakeLists.txt
  36. 1 1
      Libs/Scripting/Python/Core/CMakeLists.txt
  37. 1 1
      Libs/Scripting/Python/Widgets/CMakeLists.txt
  38. 1 1
      Libs/Visualization/VTK/Core/CMakeLists.txt
  39. 2 2
      Libs/Visualization/VTK/Widgets/CMakeLists.txt
  40. 1 1
      Libs/Visualization/VTK/Widgets/Plugins/CMakeLists.txt
  41. 2 2
      Libs/Visualization/VTK/Widgets/Testing/Cpp/CMakeLists.txt
  42. 1 1
      Libs/Visualization/XIP/CMakeLists.txt
  43. 1 1
      Libs/Widgets/CMakeLists.txt
  44. 1 1
      Plugins/org.commontk.configadmin/CMakeLists.txt
  45. 1 1
      Plugins/org.commontk.eventadmin/CMakeLists.txt
  46. 3 3
      Plugins/org.commontk.eventbus/Testing/Cpp/CMakeLists.txt
  47. 1 1
      Plugins/org.commontk.metatype/CMakeLists.txt
  48. 1 1
      Plugins/org.commontk.slicermodule/CMakeLists.txt
  49. 3 3
      Utilities/CMake/FindCTK.cmake
  50. 3 3
      Utilities/CMake/FindDCMTK.cmake
  51. 7 7
      Utilities/CMake/FindOpenIGTLink.cmake
  52. 7 7
      Utilities/CMake/FindZMQ.cmake
  53. 1 1
      Utilities/KWStyle/KWStyle.cmake

+ 1 - 1
Applications/Testing/Cpp/CMakeLists.txt

@@ -50,7 +50,7 @@ if (CTK_APP_ctkDICOMQuery AND CTK_APP_ctkDICOMRetrieve)
   if(WIN32)
     set(CTK_APPLICATION_RUNTIME_DIRECTORY
           ${CTK_APPLICATION_RUNTIME_DIRECTORY}/${CMAKE_BUILD_TYPE})
-  endif(WIN32)
+  endif()
 
   set(ctkDICOMQuery_EXECUTABLE ${CTK_APPLICATION_RUNTIME_DIRECTORY}/ctkDICOMQuery)
   set(ctkDICOMQuery_DB_FILE ${CTK_BINARY_DIR}/Testing/Temporary/ctkDICOMApplicationTest1.db)

+ 1 - 1
Applications/ctkCLIPluginExplorer/CMakeLists.txt

@@ -36,4 +36,4 @@ ctkMacroBuildApp(
 # Testing
 if(BUILD_TESTING)
 #   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Applications/ctkDICOM/CMakeLists.txt

@@ -37,4 +37,4 @@ ctkMacroBuildApp(
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Applications/ctkDICOM/Testing/Cpp/CMakeLists.txt

@@ -17,7 +17,7 @@ target_link_libraries(${KIT}CppTests ${KIT_target_libraries})
 set( KIT_TESTS ${CPP_TEST_PATH}/${KIT}CppTests)
 if(WIN32)
   set(KIT_TESTS ${CPP_TEST_PATH}/${CMAKE_BUILD_TYPE}/${KIT}CppTests)
-endif(WIN32)
+endif()
 
 macro( SIMPLE_TEST  TESTNAME )
   add_test( ${TESTNAME} ${KIT_TESTS} ${TESTNAME} )

+ 1 - 1
Applications/ctkDICOMDemoSCU/CMakeLists.txt

@@ -41,4 +41,4 @@ ctkMacroBuildApp(
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Applications/ctkDICOMDemoSCU/Testing/Cpp/CMakeLists.txt

@@ -17,7 +17,7 @@ target_link_libraries(${KIT}CppTests ${KIT_target_libraries})
 set( KIT_TESTS ${CPP_TEST_PATH}/${KIT}CppTests)
 if(WIN32)
   set(KIT_TESTS ${CPP_TEST_PATH}/${CMAKE_BUILD_TYPE}/${KIT}CppTests)
-endif(WIN32)
+endif()
 
 macro( SIMPLE_TEST  TESTNAME )
   add_test( ${TESTNAME} ${KIT_TESTS} ${TESTNAME} )

+ 1 - 1
Applications/ctkDICOMIndexer/CMakeLists.txt

@@ -37,4 +37,4 @@ ctkMacroBuildApp(
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Applications/ctkDICOMIndexer/Testing/Cpp/CMakeLists.txt

@@ -17,7 +17,7 @@ target_link_libraries(${KIT}CppTests ${KIT_target_libraries})
 set( KIT_TESTS ${CPP_TEST_PATH}/${KIT}CppTests)
 if(WIN32)
   set(KIT_TESTS ${CPP_TEST_PATH}/${CMAKE_BUILD_TYPE}/${KIT}CppTests)
-endif(WIN32)
+endif()
 
 macro( SIMPLE_TEST  TESTNAME )
   add_test( ${TESTNAME} ${KIT_TESTS} ${TESTNAME} )

+ 1 - 1
Applications/ctkDICOMObjectViewer/CMakeLists.txt

@@ -36,4 +36,4 @@ ctkMacroBuildApp(
 # Testing
 if(BUILD_TESTING)
 #   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Applications/ctkDICOMQuery/CMakeLists.txt

@@ -37,4 +37,4 @@ ctkMacroBuildApp(
 # Testing
 if(BUILD_TESTING)
   #add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Applications/ctkDICOMQueryRetrieve/CMakeLists.txt

@@ -37,4 +37,4 @@ ctkMacroBuildApp(
 # Testing
 if(BUILD_TESTING)
   #add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Applications/ctkDICOMQueryRetrieve/Testing/Cpp/CMakeLists.txt

@@ -14,7 +14,7 @@ target_link_libraries(${KIT}CppTests ${LIBRARY_NAME})
 set( KIT_TESTS ${CPP_TEST_PATH}/${KIT}CppTests)
 if(WIN32)
   set(KIT_TESTS ${CPP_TEST_PATH}/${CMAKE_BUILD_TYPE}/${KIT}CppTests)
-endif(WIN32)
+endif()
 
 macro( SIMPLE_TEST  TESTNAME )
   add_test( ${TESTNAME} ${KIT_TESTS} ${TESTNAME} )

+ 1 - 1
Applications/ctkDICOMRetrieve/CMakeLists.txt

@@ -37,4 +37,4 @@ ctkMacroBuildApp(
 # Testing
 if(BUILD_TESTING)
   #add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Applications/ctkEventBusDemo/CMakeLists.txt

@@ -51,4 +51,4 @@ ctkMacroBuildApp(
 # Testing
 if(BUILD_TESTING)
 #   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Applications/ctkExampleHost/CMakeLists.txt

@@ -41,4 +41,4 @@ ctkMacroBuildApp(
 # Testing
 if(BUILD_TESTING)
 #   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Applications/ctkExampleHostedApp/CMakeLists.txt

@@ -39,4 +39,4 @@ ctkMacroBuildApp(
 # Testing
 if(BUILD_TESTING)
 #   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Applications/ctkPluginBrowser/CMakeLists.txt

@@ -46,4 +46,4 @@ ctkMacroBuildApp(
 # Testing
 if(BUILD_TESTING)
 #   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Applications/ctkPluginGenerator/CMakeLists.txt

@@ -43,4 +43,4 @@ ctkMacroBuildApp(
 # Testing
 if(BUILD_TESTING)
 #   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Applications/ctkSimplePythonShell/CMakeLists.txt

@@ -130,4 +130,4 @@ add_subdirectory(Python)
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
CMake/ctkFunctionApplyPatches.cmake

@@ -40,7 +40,7 @@ function(ctkFunctionApplyPatches PATCH_EXE SRC_DIR PATCH_FILES)
     execute_process(COMMAND ${PATCH_EXE} -p0 -i "${patch_file}" -d "${SRC_DIR}" RESULT_VARIABLE result_var)
     if(result_var)
       message("ERROR: ${result_var}")
-    endif(result_var)
+    endif()
   endforeach()
   
 endfunction()

+ 7 - 7
CMake/ctkFunctionCMakeDoxygenFilterCompile.cmake

@@ -27,11 +27,11 @@ function(ctkFunctionCMakeDoxygenFilterCompile)
 
   foreach(arg_name ${arg_names})
     set(${prefix}_${arg_name})
-  endforeach(arg_name)
+  endforeach()
 
   foreach(option ${option_names})
     set(${prefix}_${option} FALSE)
-  endforeach(option)
+  endforeach()
 
   set(current_arg_name DEFAULT_ARGS)
   set(current_arg_list)
@@ -43,16 +43,16 @@ function(ctkFunctionCMakeDoxygenFilterCompile)
       set(${prefix}_${current_arg_name} ${current_arg_list})
       set(current_arg_name "${arg}")
       set(current_arg_list)
-    else(is_arg_name GREATER -1)
+    else()
       set(loption_names ${option_names})
       list(FIND loption_names "${arg}" is_option)
       if(is_option GREATER -1)
         set(${prefix}_${arg} TRUE)
-      else(is_option GREATER -1)
+      else()
         set(current_arg_list ${current_arg_list} "${arg}")
-      endif(is_option GREATER -1)
-    endif(is_arg_name GREATER -1)
-  endforeach(arg ${ARGN})
+      endif()
+    endif()
+  endforeach()
 
   set(${prefix}_${current_arg_name} ${current_arg_list})
 

+ 1 - 1
CMake/ctkMacroBuildLib.cmake

@@ -152,7 +152,7 @@ macro(ctkMacroBuildLib)
 
   if(MINGW)
     list(APPEND my_libs ssp) # add stack smash protection lib
-  endif(MINGW)
+  endif()
   target_link_libraries(${lib_name} ${my_libs})
 
   # Update CTK_BASE_LIBRARIES

+ 8 - 8
CMake/ctkMacroListFilter.cmake

@@ -23,14 +23,14 @@ macro(CtkMacroListFilter)
   list(LENGTH LIST_FILTER_DEFAULT_ARGS LIST_FILTER_default_length)
   if(${LIST_FILTER_default_length} EQUAL 0)
     message(FATAL_ERROR "LIST_FILTER: missing list variable.")
-  endif(${LIST_FILTER_default_length} EQUAL 0)
+  endif()
   if(${LIST_FILTER_default_length} EQUAL 1)
     message(FATAL_ERROR "LIST_FILTER: missing regular expression variable.")
-  endif(${LIST_FILTER_default_length} EQUAL 1)
+  endif()
   # Reset output variable
   if(NOT LIST_FILTER_OUTPUT_VARIABLE)
     set(LIST_FILTER_OUTPUT_VARIABLE "LIST_FILTER_internal_output")
-  endif(NOT LIST_FILTER_OUTPUT_VARIABLE)
+  endif()
   set(${LIST_FILTER_OUTPUT_VARIABLE})
   # Extract input list from arguments
   list(GET LIST_FILTER_DEFAULT_ARGS 0 LIST_FILTER_input_list)
@@ -40,12 +40,12 @@ macro(CtkMacroListFilter)
       foreach(LIST_FILTER_regexp ${${LIST_FILTER_regexp_var}})
         if(${LIST_FILTER_item} MATCHES ${LIST_FILTER_regexp})
           list(APPEND ${LIST_FILTER_OUTPUT_VARIABLE} ${LIST_FILTER_item})
-        endif(${LIST_FILTER_item} MATCHES ${LIST_FILTER_regexp})
-      endforeach(LIST_FILTER_regexp ${${LIST_FILTER_regexp_var}})
-    endforeach(LIST_FILTER_regexp_var)
-  endforeach(LIST_FILTER_item)
+        endif()
+      endforeach()
+    endforeach()
+  endforeach()
   # If OUTPUT_VARIABLE is not specified, overwrite the input list.
   if(${LIST_FILTER_OUTPUT_VARIABLE} STREQUAL "LIST_FILTER_internal_output")
     set(${LIST_FILTER_input_list} ${${LIST_FILTER_OUTPUT_VARIABLE}})
-  endif(${LIST_FILTER_OUTPUT_VARIABLE} STREQUAL "LIST_FILTER_internal_output")
+  endif()
 endmacro(CtkMacroListFilter)

+ 3 - 3
CMake/ctkMacroParseArguments.cmake

@@ -7,10 +7,10 @@ macro(CtkMacroParseArguments prefix arg_names option_names)
   set(DEFAULT_ARGS)
   foreach(arg_name ${arg_names})
     set(${prefix}_${arg_name})
-  endforeach(arg_name)
+  endforeach()
   foreach(option ${option_names})
     set(${prefix}_${option} FALSE)
-  endforeach(option)
+  endforeach()
 
   set(current_arg_name DEFAULT_ARGS)
   set(current_arg_list)
@@ -30,6 +30,6 @@ macro(CtkMacroParseArguments prefix arg_names option_names)
         set(current_arg_list ${current_arg_list} ${arg})
       ENDIF (is_option GREATER -1)
     ENDIF (is_arg_name GREATER -1)
-  endforeach(arg)
+  endforeach()
   set(${prefix}_${current_arg_name} ${current_arg_list})
 endmacro()

+ 2 - 2
CMake/ctkMacroSetupQt.cmake

@@ -48,8 +48,8 @@ macro(ctkMacroSetupQt)
       get_filename_component(QT_INSTALLED_LIBRARY_DIR ${QT_QMAKE_EXECUTABLE} PATH)
     endif()
 
-  else(QT4_FOUND)
+  else()
     message(FATAL_ERROR "error: Qt4 was not found on your system. You probably need to set the QT_QMAKE_EXECUTABLE variable")
-  endif(QT4_FOUND)
+  endif()
 
 endmacro()

+ 1 - 1
CMake/ctkMacroWrapPythonQt.cmake

@@ -119,7 +119,7 @@ macro(ctkMacroWrapPythonQt WRAPPING_NAMESPACE TARGET SRCS_LIST_NAME SOURCES IS_W
   set(PYTHON_LIBRARY_PATH ${PYTHON_DIR_PATH}/../lib)
   if(WIN32)
     set(PYTHON_LIBRARY_PATH ${PYTHON_DIR_PATH})
-  endif(WIN32)
+  endif()
 
   # Clear log file
   file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/ctkMacroWrapPythonQt_log.txt" "")

+ 1 - 1
CMakeLists.txt

@@ -721,7 +721,7 @@ endforeach()
 
 if(BUILD_TESTING)
   add_subdirectory(Applications/Testing)
-endif(BUILD_TESTING)
+endif()
 
 
 #-----------------------------------------------------------------------------

+ 3 - 3
Documentation/CMakeLists.txt

@@ -61,9 +61,9 @@ if( DOXYGEN_FOUND )
       )
     set_target_properties(doc-dev PROPERTIES LABELS Documentation)
 
-  else( DOXYGEN_DOT_FOUND )
+  else()
     message( WARNING
       "Warning: Dot not found - Documentation will not be created"
       )
-  endif( DOXYGEN_DOT_FOUND )
-endif( DOXYGEN_FOUND )
+  endif()
+endif()

+ 1 - 1
Libs/Core/CMakeLists.txt

@@ -134,4 +134,4 @@ endif()
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Libs/DICOM/Core/CMakeLists.txt

@@ -94,4 +94,4 @@ endif()
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Libs/DICOM/Widgets/CMakeLists.txt

@@ -95,4 +95,4 @@ endif()
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Libs/ImageProcessing/ITK/Core/CMakeLists.txt

@@ -61,4 +61,4 @@ endif()
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Libs/Messaging/Core/CMakeLists.txt

@@ -64,4 +64,4 @@ endif()
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Libs/ModuleDescription/CMakeLists.txt

@@ -77,4 +77,4 @@ endif()
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Libs/PluginFramework/CMakeLists.txt

@@ -162,4 +162,4 @@ endif()
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Libs/Scripting/Python/Core/CMakeLists.txt

@@ -76,4 +76,4 @@ add_subdirectory(Python)
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Libs/Scripting/Python/Widgets/CMakeLists.txt

@@ -64,4 +64,4 @@ endif()
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Libs/Visualization/VTK/Core/CMakeLists.txt

@@ -100,4 +100,4 @@ endif()
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 2 - 2
Libs/Visualization/VTK/Widgets/CMakeLists.txt

@@ -113,7 +113,7 @@ IF (${CTK_USE_CHARTS})
       vtkCharts
       ${VTK_LIBRARIES})
   add_definitions(-DCTK_USE_CHARTS)
-endif(${CTK_USE_CHARTS})
+endif()
 
 # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
 # The following macro will read the target libraries from the file 'target_libraries.cmake'
@@ -146,4 +146,4 @@ endif()
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Libs/Visualization/VTK/Widgets/Plugins/CMakeLists.txt

@@ -62,7 +62,7 @@ if(CTK_USE_CHARTS)
       ctkVTKScalarsToColorsWidgetPlugin.h
       ctkVTKVolumePropertyWidgetPlugin.h
       ${PLUGIN_MOC_SRCS})
-endif(CTK_USE_CHARTS)
+endif()
 
 # Resources
 set(PLUGIN_resources

+ 2 - 2
Libs/Visualization/VTK/Widgets/Testing/Cpp/CMakeLists.txt

@@ -37,7 +37,7 @@ if(CTK_USE_CHARTS)
       ctkVTKScalarsToColorsWidgetTest2.cpp
       ctkVTKScalarsToColorsWidgetTest3.cpp
       ${TEST_SOURCES})
-endif(CTK_USE_CHARTS)
+endif()
 
 #
 # Tests expecting CTKData to be set
@@ -111,7 +111,7 @@ IF (CTK_USE_CHARTS)
   SIMPLE_TEST( ctkVTKScalarsToColorsWidgetTest1 )
   SIMPLE_TEST( ctkVTKScalarsToColorsWidgetTest2 )
   SIMPLE_TEST( ctkVTKScalarsToColorsWidgetTest3 )
-endif(CTK_USE_CHARTS)
+endif()
 SIMPLE_TEST( ctkVTKRenderViewTest1 )
 SIMPLE_TEST( ctkVTKSliceViewTest1 )
 SIMPLE_TEST( ctkVTKSurfaceMaterialPropertyWidgetTest1 )

+ 1 - 1
Libs/Visualization/XIP/CMakeLists.txt

@@ -57,4 +57,4 @@ endif()
 # Testing
 if(BUILD_TESTING)
   #add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Libs/Widgets/CMakeLists.txt

@@ -297,4 +297,4 @@ endif()
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Plugins/org.commontk.configadmin/CMakeLists.txt

@@ -62,4 +62,4 @@ ctkMacroBuildPlugin(
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Plugins/org.commontk.eventadmin/CMakeLists.txt

@@ -126,4 +126,4 @@ ctkMacroBuildPlugin(
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 3 - 3
Plugins/org.commontk.eventbus/Testing/Cpp/CMakeLists.txt

@@ -38,14 +38,14 @@ macro(ctkMacroInitProject test)
         set(MOC_FILE "${FILE_NAME}.moc")
         QT4_GENERATE_MOC(${FILE_NAME_ABS} ${MOC_FILE})
         list(APPEND MY_MOC_CXX "${CMAKE_CURRENT_BINARY_DIR}/${MOC_FILE}")
-      endif(NOT ${FILE_NAME} STREQUAL "main")
+      endif()
     endforeach()
-  else(${test})
+  else()
     ## Moc the library's .h files
     QT4_WRAP_CPP(MY_MOC_CXX ${include_file_list})
     QT4_WRAP_UI(MY_UI_CXX ${ui_file_list})
     #QT4_ADD_RESOURCES(MY_RESOURCE_CXX ${resource_file_list})
-  endif(${test})
+  endif()
 
   set(PROJECT_SRCS
     ${PROJECT_SRCS}

+ 1 - 1
Plugins/org.commontk.metatype/CMakeLists.txt

@@ -59,4 +59,4 @@ ctkMacroBuildPlugin(
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 1 - 1
Plugins/org.commontk.slicermodule/CMakeLists.txt

@@ -54,4 +54,4 @@ target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
 # Testing
 if(BUILD_TESTING)
   add_subdirectory(Testing)
-endif(BUILD_TESTING)
+endif()

+ 3 - 3
Utilities/CMake/FindCTK.cmake

@@ -57,9 +57,9 @@ if(NOT CTK_FOUND)
   # CTK not found, explain to the user how to specify its location.
   if(CTK_FIND_REQUIRED)
     message(FATAL_ERROR ${CTK_DIR_MESSAGE})
-  else(CTK_FIND_REQUIRED)
+  else()
     if(NOT CTK_FIND_QUIETLY)
       message(STATUS ${CTK_DIR_MESSAGE})
-    endif(NOT CTK_FIND_QUIETLY)
-  endif(CTK_FIND_REQUIRED)
+    endif()
+  endif()
 endif()

+ 3 - 3
Utilities/CMake/FindDCMTK.cmake

@@ -34,7 +34,7 @@ if( NOT DCMTK_FOUND )
   set( DCMTK_DIR "/usr/include/dcmtk/"
     CACHE PATH "Root of DCMTK source tree (optional)." )
   mark_as_advanced( DCMTK_DIR )
-endif( NOT DCMTK_FOUND )
+endif()
 
 find_path( DCMTK_config_INCLUDE_DIR osconfig.h
   PATHS
@@ -299,11 +299,11 @@ if( DCMTK_config_INCLUDE_DIR
    ${DCMTK_LIBRARIES}
    ${DCMTK_imagedb_LIBRARY}
    )
-  endif(DCMTK_imagedb_LIBRARY)
+  endif()
 
   if( WIN32 )
     set( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} ws2_32 netapi32 wsock32)
-  endif( WIN32 )
+  endif()
   
 #   IF (NOT WIN32)
 #     set( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} ${DCMTK_wrap_LIBRARY} )

+ 7 - 7
Utilities/CMake/FindOpenIGTLink.cmake

@@ -28,16 +28,16 @@ if(NOT OpenIGTLink_DIR)
   # Get the system search path as a list.
   if(UNIX)
     string(REGEX MATCHALL "[^:]+" OpenIGTLink_DIR_SEARCH1 "$ENV{PATH}")
-  else(UNIX)
+  else()
     string(REGEX REPLACE "\\\\" "/" OpenIGTLink_DIR_SEARCH1 "$ENV{PATH}")
-  endif(UNIX)
+  endif()
   string(REGEX REPLACE "/;" ";" OpenIGTLink_DIR_SEARCH2 ${OpenIGTLink_DIR_SEARCH1})
 
   # Construct a set of paths relative to the system search path.
   set(OpenIGTLink_DIR_SEARCH "")
   foreach(dir ${OpenIGTLink_DIR_SEARCH2})
     set(OpenIGTLink_DIR_SEARCH ${OpenIGTLink_DIR_SEARCH} "${dir}/../lib/igtl")
-  endforeach(dir)
+  endforeach()
 
   #
   # Look for an installation or build tree.
@@ -69,7 +69,7 @@ if(NOT OpenIGTLink_DIR)
     # Help the user find it if we cannot.
     DOC "The ${OpenIGTLink_DIR_STRING}"
   )
-endif(NOT OpenIGTLink_DIR)
+endif()
 
 # If OpenIGTLink was found, load the configuration file to get the rest of the
 # settings.
@@ -79,10 +79,10 @@ if(OpenIGTLink_DIR)
 
   # Set USE_OpenIGTLink_FILE for backward-compatability.
   set(USE_OpenIGTLink_FILE ${OpenIGTLink_USE_FILE})
-else(OpenIGTLink_DIR)
+else()
   set(OpenIGTLink_FOUND 0)
   if(OpenIGTLink_FIND_REQUIRED)
     message(FATAL_ERROR "Please set OpenIGTLink_DIR to the ${OpenIGTLink_DIR_STRING}")
-  endif(OpenIGTLink_FIND_REQUIRED)
-endif(OpenIGTLink_DIR)
+  endif()
+endif()
 

+ 7 - 7
Utilities/CMake/FindZMQ.cmake

@@ -28,16 +28,16 @@ if(NOT ZMQ_DIR)
   # Get the system search path as a list.
   if(UNIX)
     string(REGEX MATCHALL "[^:]+" ZMQ_DIR_SEARCH1 "$ENV{PATH}")
-  else(UNIX)
+  else()
     string(REGEX REPLACE "\\\\" "/" ZMQ_DIR_SEARCH1 "$ENV{PATH}")
-  endif(UNIX)
+  endif()
   string(REGEX REPLACE "/;" ";" ZMQ_DIR_SEARCH2 ${ZMQ_DIR_SEARCH1})
 
   # Construct a set of paths relative to the system search path.
   set(ZMQ_DIR_SEARCH "")
   foreach(dir ${ZMQ_DIR_SEARCH2})
     set(ZMQ_DIR_SEARCH ${ZMQ_DIR_SEARCH} "${dir}/../lib/zmq")
-  endforeach(dir)
+  endforeach()
 
   #
   # Look for an installation or build tree.
@@ -69,7 +69,7 @@ if(NOT ZMQ_DIR)
     # Help the user find it if we cannot.
     DOC "The ${ZMQ_DIR_STRING}"
   )
-endif(NOT ZMQ_DIR)
+endif()
 
 # If ZMQ was found, load the configuration file to get the rest of the
 # settings.
@@ -79,9 +79,9 @@ if(ZMQ_DIR)
 
   # Set USE_ZMQ_FILE for backward-compatability.
   set(USE_ZMQ_FILE ${ZMQ_USE_FILE})
-else(ZMQ_DIR)
+else()
   set(ZMQ_FOUND 0)
   if(ZMQ_FIND_REQUIRED)
     message(FATAL_ERROR "Please set ZMQ_DIR to the ${ZMQ_DIR_STRING}")
-  endif(ZMQ_FIND_REQUIRED)
-endif(ZMQ_DIR)
+  endif()
+endif()

+ 1 - 1
Utilities/KWStyle/KWStyle.cmake

@@ -51,4 +51,4 @@ if( CTK_USE_KWSTYLE )
   add_custom_target(qCTKStyleCheck DEPENDS ${CTK_BINARY_DIR}/qCTKStyleReport.txt)
   add_test(qCTKStyleTest ${KWSTYLE_EXECUTABLE} ${CTK_KWSTYLE_ARGUMENTS})
 
-endif( CTK_USE_KWSTYLE )
+endif()