Skip to content

Commit 52eb8a1

Browse files
author
Heiko Thiel
committed
Unified if/else/elseif/endif style
* commands are now always in lowercase * remove unnecessary expressions in else/endif * unified whitespaces between command and bracket
1 parent e5eb7be commit 52eb8a1

File tree

120 files changed

+652
-652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+652
-652
lines changed

Diff for: 2d/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if(build)
3131
set(VTK_USE_FILE "${VTK_USE_FILE}" CACHE INTERNAL "VTK_USE_FILE")
3232
include("${VTK_USE_FILE}")
3333
set(VTK_IO_TARGET_LINK_LIBRARIES vtkCommon vtkWidgets vtkIO vtkImaging)
34-
endif(${VTK_FOUND})
34+
endif()
3535

3636
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include" ${VTK_INCLUDE_DIRECTORIES})
3737

@@ -42,4 +42,4 @@ if(build)
4242
PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}" ${incs})
4343
PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/impl" ${impl_incs})
4444

45-
endif(build)
45+
endif()

Diff for: CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
122122

123123
if(NOT ANDROID)
124124
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
125-
endif(NOT ANDROID)
125+
endif()
126126

127127
if("${CMAKE_SHARED_LINKER_FLAGS}" STREQUAL "" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
128128
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
@@ -237,9 +237,9 @@ SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
237237
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
238238
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
239239
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}" is_system_dir)
240-
IF("${is_system_dir}" STREQUAL "-1")
240+
if("${is_system_dir}" STREQUAL "-1")
241241
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
242-
ENDIF("${is_system_dir}" STREQUAL "-1")
242+
endif()
243243

244244
### ---[ Find universal dependencies
245245
# the gcc-4.2.1 coming with MacOS X is not compatible with the OpenMP pragmas we use, so disabling OpenMP for it
@@ -270,7 +270,7 @@ if(OPENMP_FOUND)
270270
else()
271271
message(WARNING "Delay loading flag for OpenMP DLL is invalid.")
272272
endif()
273-
endif(MSVC)
273+
endif()
274274
else()
275275
message(STATUS "Not found OpenMP")
276276
endif()

Diff for: PCLConfig.cmake.in

+53-53
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ endmacro(pcl_report_not_found)
4545
macro(pcl_message)
4646
if(NOT PCL_FIND_QUIETLY)
4747
message(${ARGN})
48-
endif(NOT PCL_FIND_QUIETLY)
48+
endif()
4949
endmacro(pcl_message)
5050

5151
# Remove duplicate libraries
@@ -76,13 +76,13 @@ macro(pcl_remove_duplicate_libraries _unfiltered_libraries _filtered_libraries)
7676
list(APPEND _optimized_libraries ${library})
7777
endif()
7878
set(_waiting_for_optimized 0)
79-
else("${library}" STREQUAL "debug")
79+
else()
8080
list(FIND _other_libraries "${library}" library_position)
8181
if(library_position EQUAL -1)
8282
list(APPEND ${_filtered_libraries} ${library})
8383
list(APPEND _other_libraries ${library})
8484
endif()
85-
endif("${library}" STREQUAL "debug")
85+
endif()
8686
endforeach(library)
8787
endmacro(pcl_remove_duplicate_libraries)
8888

@@ -92,26 +92,26 @@ macro(find_boost)
9292
set(BOOST_ROOT "${PCL_ROOT}/3rdParty/Boost")
9393
elseif(NOT BOOST_INCLUDEDIR)
9494
set(BOOST_INCLUDEDIR "@Boost_INCLUDE_DIR@")
95-
endif(PCL_ALL_IN_ONE_INSTALLER)
95+
endif()
9696
# use static Boost in Windows
9797
if(WIN32)
9898
set(Boost_USE_STATIC_LIBS @Boost_USE_STATIC_LIBS@)
9999
set(Boost_USE_STATIC @Boost_USE_STATIC@)
100100
set(Boost_USE_MULTITHREAD @Boost_USE_MULTITHREAD@)
101-
endif(WIN32)
101+
endif()
102102
if(${CMAKE_VERSION} VERSION_LESS 2.8.5)
103103
set(Boost_ADDITIONAL_VERSIONS
104104
"1.47.0" "1.47" "1.46.1"
105105
"1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43")
106-
else(${CMAKE_VERSION} VERSION_LESS 2.8.5)
106+
else()
107107
set(Boost_ADDITIONAL_VERSIONS
108108
"@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@.@Boost_SUBMINOR_VERSION@" "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@"
109109
"1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
110110
"1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
111111
"1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
112112
"1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
113113
"1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47")
114-
endif(${CMAKE_VERSION} VERSION_LESS 2.8.5)
114+
endif()
115115
# Disable the config mode of find_package(Boost)
116116
set(Boost_NO_BOOST_CMAKE ON)
117117
find_package(Boost 1.40.0 ${QUIET_} COMPONENTS @PCLCONFIG_AVAILABLE_BOOST_MODULES@)
@@ -122,7 +122,7 @@ macro(find_boost)
122122
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
123123
if(WIN32 AND NOT MINGW)
124124
set(BOOST_DEFINITIONS ${BOOST_DEFINITIONS} -DBOOST_ALL_NO_LIB)
125-
endif(WIN32 AND NOT MINGW)
125+
endif()
126126
endmacro(find_boost)
127127

128128
#remove this as soon as eigen is shipped with FindEigen.cmake
@@ -131,7 +131,7 @@ macro(find_eigen)
131131
set(EIGEN_ROOT "${PCL_ROOT}/3rdParty/Eigen")
132132
elseif(NOT EIGEN_ROOT)
133133
get_filename_component(EIGEN_ROOT "@EIGEN_INCLUDE_DIRS@" ABSOLUTE)
134-
endif(PCL_ALL_IN_ONE_INSTALLER)
134+
endif()
135135
find_package(Eigen)
136136
set(EIGEN_DEFINITIONS ${EIGEN_DEFINITIONS})
137137
endmacro(find_eigen)
@@ -142,7 +142,7 @@ macro(find_qhull)
142142
set(QHULL_ROOT "${PCL_ROOT}/3rdParty/Qhull")
143143
elseif(NOT QHULL_ROOT)
144144
get_filename_component(QHULL_ROOT "@QHULL_INCLUDE_DIRS@" PATH)
145-
endif(PCL_ALL_IN_ONE_INSTALLER)
145+
endif()
146146

147147
set(QHULL_USE_STATIC @QHULL_USE_STATIC@)
148148
find_package(Qhull)
@@ -230,7 +230,7 @@ macro(find_flann)
230230
set(FLANN_ROOT "${PCL_ROOT}/3rdParty/Flann")
231231
elseif(NOT FLANN_ROOT)
232232
get_filename_component(FLANN_ROOT "@FLANN_INCLUDE_DIRS@" PATH)
233-
endif(PCL_ALL_IN_ONE_INSTALLER)
233+
endif()
234234

235235
set(FLANN_USE_STATIC @FLANN_USE_STATIC@)
236236
find_package(FLANN)
@@ -245,7 +245,7 @@ macro(find_VTK)
245245
endif()
246246
elseif(NOT VTK_DIR AND NOT ANDROID)
247247
set(VTK_DIR "@VTK_DIR@" CACHE PATH "The directory containing VTKConfig.cmake")
248-
endif(PCL_ALL_IN_ONE_INSTALLER AND NOT ANDROID)
248+
endif()
249249
if(NOT ANDROID)
250250
find_package(VTK ${QUIET_})
251251
endif()
@@ -262,7 +262,7 @@ macro(find_libusb)
262262
NAMES usb-1.0
263263
PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib)
264264
find_package_handle_standard_args(libusb-1.0 LIBUSB_1_LIBRARY LIBUSB_1_INCLUDE_DIR)
265-
endif(NOT WIN32)
265+
endif()
266266
endmacro(find_libusb)
267267

268268
macro(find_glew)
@@ -311,7 +311,7 @@ macro(find_external_library _component _lib _is_optional)
311311
find_glew()
312312
elseif("${_lib}" STREQUAL "opengl")
313313
find_package(OpenGL)
314-
endif("${_lib}" STREQUAL "boost")
314+
endif()
315315

316316
string(TOUPPER "${_component}" COMPONENT)
317317
string(TOUPPER "${_lib}" LIB)
@@ -320,16 +320,16 @@ macro(find_external_library _component _lib _is_optional)
320320
list(APPEND PCL_${COMPONENT}_INCLUDE_DIRS ${${LIB}_INCLUDE_DIRS})
321321
if(${LIB}_USE_FILE)
322322
include(${${LIB}_USE_FILE})
323-
else(${LIB}_USE_FILE)
323+
else()
324324
list(APPEND PCL_${COMPONENT}_LIBRARY_DIRS "${${LIB}_LIBRARY_DIRS}")
325-
endif(${LIB}_USE_FILE)
325+
endif()
326326
if(${LIB}_LIBRARIES)
327327
list(APPEND PCL_${COMPONENT}_LIBRARIES "${${LIB}_LIBRARIES}")
328-
endif(${LIB}_LIBRARIES)
328+
endif()
329329
if(${LIB}_DEFINITIONS AND NOT ${LIB} STREQUAL "VTK")
330330
list(APPEND PCL_${COMPONENT}_DEFINITIONS ${${LIB}_DEFINITIONS})
331-
endif(${LIB}_DEFINITIONS AND NOT ${LIB} STREQUAL "VTK")
332-
else(${LIB}_FOUND)
331+
endif()
332+
else()
333333
if("${_is_optional}" STREQUAL "OPTIONAL")
334334
list(APPEND PCL_${COMPONENT}_DEFINITIONS "-DDISABLE_${LIB}")
335335
pcl_message("** WARNING ** ${_component} features related to ${_lib} will be disabled")
@@ -341,9 +341,9 @@ macro(find_external_library _component _lib _is_optional)
341341
string(TOUPPER "${_component}" COMPONENT)
342342
pcl_message("** WARNING ** ${_component} will be disabled cause ${_lib} was not found")
343343
list(REMOVE_ITEM PCL_TO_FIND_COMPONENTS ${_component})
344-
endif((NOT PCL_FIND_ALL) OR (PCL_FIND_ALL EQUAL 1))
345-
endif("${_is_optional}" STREQUAL "OPTIONAL")
346-
endif(${LIB}_FOUND)
344+
endif()
345+
endif()
346+
endif()
347347
endmacro(find_external_library)
348348

349349
macro(pcl_check_external_dependency _component)
@@ -363,38 +363,38 @@ macro(compute_dependencies TO_FIND_COMPONENTS)
363363
list(INSERT ${TO_FIND_COMPONENTS} ${pos} ${dependency})
364364
if(pcl_${dependency}_ext_dep)
365365
list(APPEND pcl_${component}_ext_dep ${pcl_${dependency}_ext_dep})
366-
endif(pcl_${dependency}_ext_dep)
366+
endif()
367367
if(pcl_${dependency}_opt_dep)
368368
list(APPEND pcl_${component}_opt_dep ${pcl_${dependency}_opt_dep})
369-
endif(pcl_${dependency}_opt_dep)
369+
endif()
370370
compute_dependencies(${TO_FIND_COMPONENTS})
371-
else(${pcl_dependency}_int_dep)
371+
else()
372372
list(INSERT ${TO_FIND_COMPONENTS} 0 ${dependency})
373-
endif(${pcl_dependency}_int_dep)
374-
endif(found EQUAL -1)
373+
endif()
374+
endif()
375375
endforeach(dependency)
376-
endif(${pcl_component}_int_dep AND (NOT PCL_FIND_ALL))
376+
endif()
377377
endforeach(component)
378378
endmacro(compute_dependencies)
379379

380380
### ---[ Find PCL
381381

382382
if(PCL_FIND_QUIETLY)
383383
set(QUIET_ QUIET)
384-
else(PCL_FIND_QUIETLY)
384+
else()
385385
set(QUIET_)
386-
endif(PCL_FIND_QUIETLY)
386+
endif()
387387

388388
find_package(PkgConfig QUIET)
389389

390390
file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR)
391391
if(WIN32 AND NOT MINGW)
392392
# PCLConfig.cmake is installed to PCL_ROOT/cmake
393393
get_filename_component(PCL_ROOT "${PCL_DIR}" PATH)
394-
else(WIN32 AND NOT MINGW)
394+
else()
395395
# PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y
396396
get_filename_component(PCL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
397-
endif(WIN32 AND NOT MINGW)
397+
endif()
398398

399399
# check whether PCLConfig.cmake is found into a PCL installation or in a build tree
400400
if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h")
@@ -404,24 +404,24 @@ if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl
404404
set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@")
405405
if(EXISTS "${PCL_ROOT}/3rdParty")
406406
set(PCL_ALL_IN_ONE_INSTALLER ON)
407-
endif(EXISTS "${PCL_ROOT}/3rdParty")
407+
endif()
408408
elseif(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h")
409409
# Found a non-standard (likely ANDROID) PCL installation
410410
# pcl_message("Found a PCL installation")
411411
set(PCL_INCLUDE_DIRS "${PCL_ROOT}/include")
412412
set(PCL_LIBRARY_DIRS "${PCL_ROOT}/lib")
413413
if(EXISTS "${PCL_ROOT}/3rdParty")
414414
set(PCL_ALL_IN_ONE_INSTALLER ON)
415-
endif(EXISTS "${PCL_ROOT}/3rdParty")
415+
endif()
416416
elseif(EXISTS "${PCL_DIR}/include/pcl/pcl_config.h")
417417
# Found PCLConfig.cmake in a build tree of PCL
418418
# pcl_message("PCL found into a build tree.")
419419
set(PCL_INCLUDE_DIRS "${PCL_DIR}/include") # for pcl_config.h
420420
set(PCL_LIBRARY_DIRS "${PCL_DIR}/@LIB_INSTALL_DIR@")
421421
set(PCL_SOURCES_TREE "@CMAKE_SOURCE_DIR@")
422-
else(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h")
422+
else()
423423
pcl_report_not_found("PCL can not be found on this machine")
424-
endif(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h")
424+
endif()
425425

426426
#set a suffix for debug libraries
427427
set(PCL_DEBUG_SUFFIX "@CMAKE_DEBUG_POSTFIX@")
@@ -453,13 +453,13 @@ if(PCL_FIND_COMPONENTS)
453453
if(PCL_FIND_COMPONENTS_LENGTH EQUAL PCL_NB_COMPONENTS)
454454
set(PCL_TO_FIND_COMPONENTS ${pcl_all_components})
455455
set(PCL_FIND_ALL 1)
456-
else(PCL_FIND_COMPONENTS_LENGTH EQUAL PCL_NB_COMPONENTS)
456+
else()
457457
set(PCL_TO_FIND_COMPONENTS ${PCL_FIND_COMPONENTS})
458-
endif(PCL_FIND_COMPONENTS_LENGTH EQUAL PCL_NB_COMPONENTS)
459-
else(PCL_FIND_COMPONENTS)
458+
endif()
459+
else()
460460
set(PCL_TO_FIND_COMPONENTS ${pcl_all_components})
461461
set(PCL_FIND_ALL 1)
462-
endif(PCL_FIND_COMPONENTS)
462+
endif()
463463

464464
compute_dependencies(PCL_TO_FIND_COMPONENTS)
465465

@@ -518,9 +518,9 @@ foreach(component ${PCL_TO_FIND_COMPONENTS})
518518

519519
if(PCL_${COMPONENT}_INCLUDE_DIR)
520520
list(APPEND PCL_${COMPONENT}_INCLUDE_DIRS "${PCL_${COMPONENT}_INCLUDE_DIR}")
521-
else(PCL_${COMPONENT}_INCLUDE_DIR)
521+
else()
522522
#pcl_message("No include directory found for pcl_${component}.")
523-
endif(PCL_${COMPONENT}_INCLUDE_DIR)
523+
endif()
524524

525525
# Skip find_library for header only modules
526526
list(FIND pcl_header_only_components ${component} _is_header_only)
@@ -544,20 +544,20 @@ foreach(component ${PCL_TO_FIND_COMPONENTS})
544544
get_filename_component(${component}_library_path_debug
545545
${PCL_${COMPONENT}_LIBRARY_DEBUG}
546546
PATH)
547-
endif(PCL_${COMPONENT}_LIBRARY_DEBUG)
547+
endif()
548548

549549
# Restrict this to Windows users
550550
if(NOT PCL_${COMPONENT}_LIBRARY AND WIN32)
551551
# might be debug only
552552
set(PCL_${COMPONENT}_LIBRARY ${PCL_${COMPONENT}_LIBRARY_DEBUG})
553-
endif(NOT PCL_${COMPONENT}_LIBRARY AND WIN32)
553+
endif()
554554

555555
find_package_handle_standard_args(PCL_${COMPONENT} DEFAULT_MSG
556556
PCL_${COMPONENT}_LIBRARY PCL_${COMPONENT}_INCLUDE_DIR)
557-
else(_is_header_only EQUAL -1)
557+
else()
558558
find_package_handle_standard_args(PCL_${COMPONENT} DEFAULT_MSG
559559
PCL_${COMPONENT}_INCLUDE_DIR)
560-
endif(_is_header_only EQUAL -1)
560+
endif()
561561

562562
if(PCL_${COMPONENT}_FOUND)
563563
if(NOT "${PCL_${COMPONENT}_INCLUDE_DIRS}" STREQUAL "")
@@ -570,7 +570,7 @@ foreach(component ${PCL_TO_FIND_COMPONENTS})
570570
list(REMOVE_DUPLICATES _filtered)
571571
set(PCL_${COMPONENT}_INCLUDE_DIRS ${_filtered})
572572
list(APPEND PCL_INCLUDE_DIRS ${_filtered})
573-
endif(NOT "${PCL_${COMPONENT}_INCLUDE_DIRS}" STREQUAL "")
573+
endif()
574574
mark_as_advanced(PCL_${COMPONENT}_INCLUDE_DIRS)
575575
if(_is_header_only EQUAL -1)
576576
list(APPEND PCL_DEFINITIONS ${PCL_${COMPONENT}_DEFINITIONS})
@@ -588,8 +588,8 @@ foreach(component ${PCL_TO_FIND_COMPONENTS})
588588
list(APPEND PCL_${COMPONENT}_INCLUDE_DIRS ${PCL_${INT_DEP}_INCLUDE_DIRS})
589589
if(PCL_${INT_DEP}_LIBRARIES)
590590
list(APPEND PCL_${COMPONENT}_LINK_LIBRARIES "${PCL_${INT_DEP}_LIBRARIES}")
591-
endif(PCL_${INT_DEP}_LIBRARIES)
592-
endif(PCL_${INT_DEP}_FOUND)
591+
endif()
592+
endif()
593593
endforeach(int_dep)
594594
if(_is_header_only EQUAL -1)
595595
add_library(${pcl_component} @PCL_LIB_TYPE@ IMPORTED)
@@ -633,20 +633,20 @@ foreach(component ${PCL_TO_FIND_COMPONENTS})
633633
endif()
634634
set(PCL_${COMPONENT}_LIBRARIES ${pcl_component})
635635
endif()
636-
endif(PCL_${COMPONENT}_FOUND)
636+
endif()
637637
endforeach(component)
638638

639639
if(NOT "${PCL_INCLUDE_DIRS}" STREQUAL "")
640640
list(REMOVE_DUPLICATES PCL_INCLUDE_DIRS)
641-
endif(NOT "${PCL_INCLUDE_DIRS}" STREQUAL "")
641+
endif()
642642

643643
if(NOT "${PCL_LIBRARY_DIRS}" STREQUAL "")
644644
list(REMOVE_DUPLICATES PCL_LIBRARY_DIRS)
645-
endif(NOT "${PCL_LIBRARY_DIRS}" STREQUAL "")
645+
endif()
646646

647647
if(NOT "${PCL_DEFINITIONS}" STREQUAL "")
648648
list(REMOVE_DUPLICATES PCL_DEFINITIONS)
649-
endif(NOT "${PCL_DEFINITIONS}" STREQUAL "")
649+
endif()
650650

651651
pcl_remove_duplicate_libraries(PCL_COMPONENTS PCL_LIBRARIES)
652652

Diff for: PCLConfigVersion.cmake.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
77
set(PACKAGE_VERSION_COMPATIBLE FALSE)
88
else()
99
set(PACKAGE_VERSION_COMPATIBLE TRUE)
10-
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
10+
if("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
1111
set(PACKAGE_VERSION_EXACT TRUE)
1212
endif()
1313
endif()

0 commit comments

Comments
 (0)