Permalink
Browse files

Run the decrufter on it all

  • Loading branch information...
1 parent b5aa239 commit 032daa12a12a5703145989daa945f028df76469e @rpavlik committed Oct 25, 2010
Showing with 553 additions and 263 deletions.
  1. +55 −33 BoostTestTargets.cmake
  2. +13 −5 BundleOSGPlugins.cmake
  3. +13 −9 BundleOSGRuntime.cmake
  4. +2 −1 CopyResourcesToBuildTree.cmake
  5. +10 −4 CppcheckTargets.cmake
  6. +2 −3 CreateDashboardScripts.cmake
  7. +23 −19 CreateLaunchers.cmake
  8. +1 −1 DoxygenTargets.cmake
  9. +3 −1 EnableExtraCompilerWarnings.cmake
  10. +13 −7 FindALUT.cmake
  11. +3 −1 FindGHOST.cmake
  12. +4 −4 FindGMTL.cmake
  13. +34 −8 FindJtTk.cmake
  14. +23 −9 FindLAPACKLibs.cmake
  15. +13 −6 FindLyX.cmake
  16. +5 −2 FindOpenCV.cmake
  17. +16 −4 FindOpenHaptics.cmake
  18. +15 −5 FindParasolid.cmake
  19. +5 −1 FindTR1.cmake
  20. +6 −1 FindVPR20.cmake
  21. +4 −3 FindVPS.cmake
  22. +47 −25 FindVRJuggler22.cmake
  23. +3 −1 FindVirtuoseAPI.cmake
  24. +5 −2 FindVirtuoseVPP.cmake
  25. +3 −1 FindWiiSCAAT.cmake
  26. +3 −1 FindWiiUse.cmake
  27. +2 −1 Findcppcheck.cmake
  28. +23 −9 Finddb2pdf.cmake
  29. +27 −17 GetCPUDetails.cmake
  30. +73 −29 Licensing.cmake
  31. +14 −12 LuaTargets.cmake
  32. +7 −3 ResetConfigurations.cmake
  33. +4 −4 SetDefaultBuildType.cmake
  34. +5 −2 StampSourcesWithVersion.cmake
  35. +2 −1 cmake-2.9.0-modules/RequireOutOfSourceBuild.cmake
  36. +5 −1 module-docs/Example-FindMyPackage-UsingImportedTargets.cmake
  37. +5 −1 module-docs/Example-FindMyPackage.cmake
  38. +7 −2 module-docs/Example-FindMySimplePackage.cmake
  39. +11 −9 nested_targets/Parasolid/CMakeLists.txt
  40. +3 −1 package-licensing/Boost.cmake
  41. +3 −1 package-licensing/Eigen.cmake
  42. +3 −0 package-licensing/FLTK.cmake
  43. +4 −1 package-licensing/Lua.cmake
  44. +3 −1 package-licensing/LuaBind.cmake
  45. +3 −1 package-licensing/OpenHapticsAcademicEdition.cmake
  46. +3 −1 package-licensing/OpenSceneGraph.cmake
  47. +3 −1 package-licensing/PhysicalModelingUtils.cmake
  48. +3 −1 package-licensing/Qt-LGPL.cmake
  49. +3 −1 package-licensing/VPS.cmake
  50. +2 −1 package-licensing/VRJuggLua.cmake
  51. +4 −2 package-licensing/VRJuggler.cmake
  52. +3 −1 package-licensing/VirtuoseAPI.cmake
  53. +4 −2 package-licensing/osgLua.cmake
View
@@ -47,15 +47,18 @@ if(NOT Boost_FOUND)
find_package(Boost 1.34.0 QUIET)
endif()
if("${Boost_VERSION}0" LESS "1034000")
- set(_shared_msg "NOTE: boost::test-based targets and tests cannot "
+ set(_shared_msg
+ "NOTE: boost::test-based targets and tests cannot "
"be added: boost >= 1.34.0 required but not found. "
"(found: '${Boost_VERSION}'; want >=103400) ")
if(BUILD_TESTING)
- message(FATAL_ERROR ${_shared_msg}
+ message(FATAL_ERROR
+ ${_shared_msg}
"You may disable BUILD_TESTING to continue without the "
"tests.")
else()
- message(STATUS ${_shared_msg}
+ message(STATUS
+ ${_shared_msg}
"BUILD_TESTING disabled, so continuing anyway.")
endif()
endif()
@@ -79,7 +82,9 @@ if(Boost_FOUND AND NOT "${Boost_VERSION}0" LESS "1034000")
set(_boostConfig "BoostTestTargetsIncluded.h")
endif()
get_filename_component(_moddir ${CMAKE_CURRENT_LIST_FILE} PATH)
- configure_file("${_moddir}/${_boostConfig}" "${CMAKE_CURRENT_BINARY_DIR}/BoostTestTargetConfig.h" COPYONLY)
+ configure_file("${_moddir}/${_boostConfig}"
+ "${CMAKE_CURRENT_BINARY_DIR}/BoostTestTargetConfig.h"
+ COPYONLY)
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
endif()
@@ -89,8 +94,14 @@ function(add_boost_test _name)
endif()
if("${CMAKE_VERSION}" VERSION_LESS "2.8.0")
if(NOT "${_boost_test_cmakever_pestered}x" EQUALS "${CMAKE_VERSION}x")
- message(STATUS "Not adding boost::test targets - CMake 2.8.0 or newer required, using ${CMAKE_VERSION}")
- set(_boost_test_cmakever_pestered "${CMAKE_VERSION}" CACHE INTERNAL "" FORCE)
+ message(STATUS
+ "Not adding boost::test targets - CMake 2.8.0 or newer required, using ${CMAKE_VERSION}")
+ set(_boost_test_cmakever_pestered
+ "${CMAKE_VERSION}"
+ CACHE
+ INTERNAL
+ ""
+ FORCE)
endif()
return()
endif()
@@ -128,7 +139,8 @@ function(add_boost_test _name)
endif()
if(NOT SOURCES)
- message(FATAL_ERROR "Syntax error in use of add_boost_test: at least one source file required!")
+ message(FATAL_ERROR
+ "Syntax error in use of add_boost_test: at least one source file required!")
endif()
if(Boost_FOUND AND NOT "${Boost_VERSION}0" LESS "1034000")
@@ -145,8 +157,11 @@ function(add_boost_test _name)
elseif("${thefile}" MATCHES ".*boost/test/included/unit_test.hpp.*")
set(includeType INCLUDED)
set(includeFileLoc ${src})
- set(_boosttesttargets_libs) # clear this out - linking would be a bad idea
- if(NOT "${thefile}" MATCHES ".*OVERRIDE_BOOST_TEST_INCLUDED_WARNING.*")
+ set(_boosttesttargets_libs) # clear this out - linking would be a bad idea
+ if(NOT
+ "${thefile}"
+ MATCHES
+ ".*OVERRIDE_BOOST_TEST_INCLUDED_WARNING.*")
message("Please replace the include line in ${src} with this alternate include line instead:")
message(" \#include <BoostTestTargetConfig.h>")
message("Once you've saved your changes, re-run CMake. (See BoostTestTargets.cmake for more info)")
@@ -157,7 +172,8 @@ function(add_boost_test _name)
if(NOT _boostTestTargetsNagged${_name} STREQUAL "${includeType}")
if("includeType" STREQUAL "CONFIGURED")
- message(STATUS "Test '${_name}' uses the CMake-configurable form of the boost test framework - congrats! (Including File: ${includeFileLoc})")
+ message(STATUS
+ "Test '${_name}' uses the CMake-configurable form of the boost test framework - congrats! (Including File: ${includeFileLoc})")
elseif("${includeType}" STREQUAL "INCLUDED")
message("In test '${_name}': ${includeFileLoc} uses the 'included' form of the boost unit test framework.")
else()
@@ -167,7 +183,12 @@ function(add_boost_test _name)
message("Once you've saved your changes, re-run CMake. (See BoostTestTargets.cmake for more info)")
endif()
endif()
- set(_boostTestTargetsNagged${_name} "${includeType}" CACHE INTERNAL "" FORCE)
+ set(_boostTestTargetsNagged${_name}
+ "${includeType}"
+ CACHE
+ INTERNAL
+ ""
+ FORCE)
if(RESOURCES)
@@ -177,7 +198,10 @@ function(add_boost_test _name)
# Generate a unique target name, using the relative binary dir
# and provided name. (transform all / into _ and remove all other
# non-alphabet characters)
- file(RELATIVE_PATH targetpath "${CMAKE_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}")
+ file(RELATIVE_PATH
+ targetpath
+ "${CMAKE_BINARY_DIR}"
+ "${CMAKE_CURRENT_BINARY_DIR}")
string(REGEX REPLACE "[^A-Za-z/_]" "" targetpath "${targetpath}")
string(REPLACE "/" "_" targetpath "${targetpath}")
@@ -194,11 +218,7 @@ function(add_boost_test _name)
endif()
if(RESOURCES)
- set_property(TARGET
- ${_target_name}
- PROPERTY
- RESOURCE
- ${RESOURCES})
+ set_property(TARGET ${_target_name} PROPERTY RESOURCE ${RESOURCES})
copy_resources_to_build_tree(${_target_name})
endif()
@@ -215,30 +235,32 @@ function(add_boost_test _name)
set(_test_command ${_target_name})
endif()
- if(TESTS AND ("${Boost_VERSION}" VERSION_GREATER "103799"))
+ if(TESTS AND ( "${Boost_VERSION}" VERSION_GREATER "103799" ))
foreach(_test ${TESTS})
- add_test(NAME ${_name}-${_test}
+ add_test(NAME
+ ${_name}-${_test}
COMMAND
- ${_test_command}
- --run_test=${_test}
- ${Boost_TEST_FLAGS})
+ ${_test_command}
+ --run_test=${_test}
+ ${Boost_TEST_FLAGS})
if(FAIL_REGULAR_EXPRESSION)
- set_tests_properties(${_name}-${_test}
- PROPERTIES
- FAIL_REGULAR_EXPRESSION
- "${FAIL_REGULAR_EXPRESSION}")
+ set_tests_properties(${_name}-${_test}
+ PROPERTIES
+ FAIL_REGULAR_EXPRESSION
+ "${FAIL_REGULAR_EXPRESSION}")
endif()
endforeach()
else()
- add_test(NAME ${_name}-boost_test
+ add_test(NAME
+ ${_name}-boost_test
COMMAND
- ${_test_command}
- ${Boost_TEST_FLAGS})
+ ${_test_command}
+ ${Boost_TEST_FLAGS})
if(FAIL_REGULAR_EXPRESSION)
- set_tests_properties(${_name}-${_test}
- PROPERTIES
- FAIL_REGULAR_EXPRESSION
- "${FAIL_REGULAR_EXPRESSION}")
+ set_tests_properties(${_name}-${_test}
+ PROPERTIES
+ FAIL_REGULAR_EXPRESSION
+ "${FAIL_REGULAR_EXPRESSION}")
endif()
endif()
View
@@ -42,10 +42,18 @@ function(_osgbundle_split_debug_versions releasevar debugvar)
endfunction()
function(_osgbundle_find_plugins varprefix filenameprefix)
- file(GLOB all "${OSG_RUNTIME_LIBRARY_DIR}/osgPlugins-${OPENSCENEGRAPH_VERSION}/${filenameprefix}*${CMAKE_SHARED_LIBRARY_SUFFIX}")
- _osgbundle_split_debug_versions(${varprefix}_PLUGINS_RELEASE ${varprefix}_PLUGINS_DEBUG ${all})
- set(${varprefix}_PLUGINS_RELEASE "${${varprefix}_PLUGINS_RELEASE}" PARENT_SCOPE)
- set(${varprefix}_PLUGINS_DEBUG "${${varprefix}_PLUGINS_DEBUG}" PARENT_SCOPE)
+ file(GLOB
+ all
+ "${OSG_RUNTIME_LIBRARY_DIR}/osgPlugins-${OPENSCENEGRAPH_VERSION}/${filenameprefix}*${CMAKE_SHARED_LIBRARY_SUFFIX}")
+ _osgbundle_split_debug_versions(${varprefix}_PLUGINS_RELEASE
+ ${varprefix}_PLUGINS_DEBUG
+ ${all})
+ set(${varprefix}_PLUGINS_RELEASE
+ "${${varprefix}_PLUGINS_RELEASE}"
+ PARENT_SCOPE)
+ set(${varprefix}_PLUGINS_DEBUG
+ "${${varprefix}_PLUGINS_DEBUG}"
+ PARENT_SCOPE)
endfunction()
if(OPENSCENEGRAPH_FOUND)
@@ -72,4 +80,4 @@ function(install_osg_plugins var)
list(APPEND INSTALLEDPLUGINS "${OSG_PATH_TO_PLUGINS}/${name}")
endforeach()
set(${var} ${INSTALLEDPLUGINS} PARENT_SCOPE)
-endfunction()
+endfunction()
View
@@ -34,8 +34,12 @@ function(_osgbundle_split_debug_versions releasevar debugvar)
endfunction()
function(_osgbundle_find_plugins varprefix filenameprefix)
- file(GLOB all "${OSG_RUNTIME_LIBRARY_DIR}/osgPlugins-${OPENSCENEGRAPH_VERSION}/${filenameprefix}*${CMAKE_SHARED_LIBRARY_SUFFIX}")
- _osgbundle_split_debug_versions(${varprefix}_PLUGINS_RELEASE ${varprefix}_PLUGINS_DEBUG ${all})
+ file(GLOB
+ all
+ "${OSG_RUNTIME_LIBRARY_DIR}/osgPlugins-${OPENSCENEGRAPH_VERSION}/${filenameprefix}*${CMAKE_SHARED_LIBRARY_SUFFIX}")
+ _osgbundle_split_debug_versions(${varprefix}_PLUGINS_RELEASE
+ ${varprefix}_PLUGINS_DEBUG
+ ${all})
endfunction()
if(OPENSCENEGRAPH_FOUND)
@@ -61,9 +65,9 @@ if(OPENSCENEGRAPH_FOUND)
set(OSG_RUNTIME_LIBRARY_DIR "${_osglibdir}")
set(_osgbundle_platformOK on)
endif()
-
+
# Find the osgDB plugins
-
+
_osgbundle_find_plugins(OSGDB osgdb)
_osgbundle_find_plugins(OSGWRAPPER osgwrapper)
endif()
@@ -94,7 +98,7 @@ if(OSGRUNTIME_BUNDLE AND OPENSCENEGRAPH_FOUND AND _osgbundle_caninstall)
if(WIN32)
set(DESTINATION bin)
install(FILES "${OSGBUNDLE_zlib1dll}"
- DESTINATION ${DESTINATION})
+ DESTINATION ${DESTINATION})
if(OSGBUNDLE_zlib1ddll)
install(FILES "${OSGBUNDLE_zlib1ddll}"
@@ -106,9 +110,9 @@ if(OSGRUNTIME_BUNDLE AND OPENSCENEGRAPH_FOUND AND _osgbundle_caninstall)
endif()
install(DIRECTORY "${_osgroot}/bin/" "${_osgroot}/lib/"
- DESTINATION ${DESTINATION}
- FILES_MATCHING
+ DESTINATION ${DESTINATION}
+ FILES_MATCHING
- # Runtime files
- PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}")
+ # Runtime files
+ PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif()
@@ -23,7 +23,8 @@ function(copy_resources_to_build_tree _target)
get_target_property(_resources ${_target} RESOURCE)
if(NOT _resources)
# Bail if no resources
- message(STATUS "Told to copy resources for target ${_target}, but "
+ message(STATUS
+ "Told to copy resources for target ${_target}, but "
"no resources are set!")
return()
endif()
View
@@ -61,7 +61,9 @@ function(add_cppcheck_sources _targetname)
list(FIND _input FAIL_ON_WARNINGS _fail_on_warn)
if("${_fail_on_warn}" GREATER "-1")
- list(APPEND CPPCHECK_FAIL_REGULAR_EXPRESSION ${CPPCHECK_WARN_REGULAR_EXPRESSION})
+ list(APPEND
+ CPPCHECK_FAIL_REGULAR_EXPRESSION
+ ${CPPCHECK_WARN_REGULAR_EXPRESSION})
list(REMOVE_AT _input ${_unused_func})
endif()
@@ -80,7 +82,8 @@ function(add_cppcheck_sources _targetname)
if(EXISTS "${_cppcheck_loc}")
list(APPEND _files "${_cppcheck_loc}")
else()
- message(FATAL_ERROR "Adding CPPCHECK for file target ${_targetname}: "
+ message(FATAL_ERROR
+ "Adding CPPCHECK for file target ${_targetname}: "
"File ${_source} does not exist or needs a corrected path location "
"since we think its absolute path is ${_cppcheck_loc}")
endif()
@@ -129,7 +132,8 @@ endfunction()
function(add_cppcheck _name)
if(NOT TARGET ${_name})
- message(FATAL_ERROR "add_cppcheck given a target name that does not exist: '${_name}' !")
+ message(FATAL_ERROR
+ "add_cppcheck given a target name that does not exist: '${_name}' !")
endif()
if(CPPCHECK_FOUND)
set(_cppcheck_args)
@@ -151,7 +155,9 @@ function(add_cppcheck _name)
list(FIND _input FAIL_ON_WARNINGS _fail_on_warn)
if("${_fail_on_warn}" GREATER "-1")
- list(APPEND CPPCHECK_FAIL_REGULAR_EXPRESSION ${CPPCHECK_WARN_REGULAR_EXPRESSION})
+ list(APPEND
+ CPPCHECK_FAIL_REGULAR_EXPRESSION
+ ${CPPCHECK_WARN_REGULAR_EXPRESSION})
list(REMOVE_AT _input ${_unused_func})
endif()
@@ -118,8 +118,7 @@ if(NOT IN_DASHBOARD_SCRIPT)
if(NOT "1.${CMAKE_VERSION}" VERSION_LESS "1.2.8.0")
if(IS_DIRECTORY "${CMAKE_SOURCE_DIRECTORY}/.git")
- find_program(DASHBOARDSCRIPT_GIT_EXECUTABLE
- NAMES git)
+ find_program(DASHBOARDSCRIPT_GIT_EXECUTABLE NAMES git)
if(DASHBOARDSCRIPT_GIT_EXECUTABLE)
set(UPDATE_TYPE "git")
@@ -164,7 +163,7 @@ function(create_dashboard_scripts)
else()
message(STATUS "You can add these sample lines to your crontab:")
endif()
-
+
set(_msg)
foreach(DASHBOARDSCRIPT_DASH_TYPE Nightly Continuous Experimental)
Oops, something went wrong.

0 comments on commit 032daa1

Please sign in to comment.