Commit Graph

48 Commits

Author SHA1 Message Date
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Brad King c4275592a8 Modules: Include builtin FindPackageHandleStandardArgs directly
The FindPackageHandleStandardArgs module was originally created outside
of CMake.  It was added for CMake 2.6.0 by commit e118a627 (add a macro
FIND_PACKAGE_HANDLE_STANDARD_ARGS..., 2007-07-18).  However, it also
proliferated into a number of other projects that at the time required
only CMake 2.4 and thus could not depend on CMake to provide the module.
CMake's own find modules started using the module in commit b5f656e0
(use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS in some of the FindXXX
modules..., 2007-07-18).

Then commit d358cf5c (add 2nd, more powerful mode to
find_package_handle_standard_args, 2010-07-29) added a new feature to
the interface of the module that was fully optional and backward
compatible with all existing users of the module.  Later commit 5f183caa
(FindZLIB: use the FPHSA version mode, 2010-08-04) and others shortly
thereafter started using the new interface in CMake's own find modules.
This change was also backward compatible because it was only an
implementation detail within each module.

Unforutnately these changes introduced a problem for projects that still
have an old copy of FindPackageHandleStandardArgs in CMAKE_MODULE_PATH.
When any such project uses one of CMake's builtin find modules the line

  include(FindPackageHandleStandardArgs)

loads the copy from the project which does not have the new interface!
Then the including find module tries to use the new interface with the
old module and fails.

Whether this breakage can be considered a backward incompatible change
in CMake is debatable.  The situation is analagous to copying a standard
library header from one version of a compiler into a project and then
observing problems when the next version of the compiler reports errors
in its other headers that depend on its new version of the original
header.  Nevertheless it is a change to CMake that causes problems for
projects that worked with previous versions.

This problem was discovered during the 2.8.3 release candidate cycle.
It is an instance of a more general problem with projects that provide
their own versions of CMake modules when other CMake modules depend on
them.  At the time we resolved this instance of the problem with commit
b0118402 (Use absolute path to FindPackageHandleStandardArgs.cmake
everywhere, 2010-09-28) for the 2.8.3 release.

In order to address the more general problem we introduced policy
CMP0017 in commit db44848f (Prefer files from CMAKE_ROOT when including
from CMAKE_ROOT, 2010-11-17).  That change was followed by commit
ce28737c (Remove usage of CMAKE_CURRENT_LIST_DIR now that we have
CMP0017, 2010-12-20) which reverted the original workaround in favor of
using the policy.  However, existing project releases do not set the
policy behavior to NEW and therefore still exhibit the problem.

We introduced in commit a364daf1 (Allow users to specify defaults for
unset policies, 2011-01-03) an option for users to build existing
projects by adding -DCMAKE_POLICY_DEFAULT_CMP0017=NEW to the command
line.  Unfortunately this solution still does not allow such projects to
build out of the box, and there is no good way to suggest the use of the
new option.

The only remaining solution to keep existing projects that exhibit this
problem building is to restore the change originally made in commit
b0118402 (Use absolute path to FindPackageHandleStandardArgs.cmake
everywhere, 2010-09-28).  This also avoids policy CMP0017 warnings for
this particular instance of the problem the policy addresses.
2011-01-20 10:56:49 -05:00
Ben Boeckel 937e3693d7 Use FPHSA in FindOpenGL
This gets FindOpenGL to obey the QUIET and REQUIRED options correctly.
2010-12-08 17:41:37 -05:00
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Brad King c4bb9c9d42 Convert CMake find-modules to BSD License
This adds copyright/license notification blocks CMake's find-modules.
Many of the modules had no notices at all.  Some had notices referring
to the BSD license already.  This commit normalizes existing notices and
adds missing notices.
2009-09-28 11:45:50 -04:00
Bill Hoffman dbc4e2f101 ENH: add path for 64 bit on old hp 2009-06-15 13:22:00 -04:00
Bill Hoffman 62a634aeba ENH: add more search paths on HPUX 2009-06-15 12:39:12 -04:00
Bill Hoffman 2f20b9d33b BUG: fix for bug 7104 look for GL in X11R6 dirs 2008-08-19 15:59:58 -04:00
Alexander Neundorf 1fe4220669 STYLE: remove unnecessary default search paths
Alex
2007-08-10 11:37:29 -04:00
Alexander Neundorf d9ec3bbe43 STYLE: don't test twice for APPLE
Alex
2007-07-03 11:41:37 -04:00
Andy Cedilnik cf80510ac5 ENH: On apple do not look for X11 2006-07-05 16:21:24 -04:00
Brad King 6207dc41bd ENH: Do not search for X11 if it is already found. 2006-06-19 10:07:44 -04:00
Bill Hoffman 1aecb478d6 ENH: go back to finding the framework opengl on the mac 2006-03-14 16:38:52 -05:00
Bill Hoffman c685c96b29 ENH: use standard include path for OpenGL 2006-03-14 15:19:37 -05:00
Bill Hoffman 4ce8f43b71 ENH: take advantage of new framework stuff 2006-03-11 12:43:26 -05:00
Ken Martin 74eaecfc3e ENH: cleanups 2005-12-15 14:17:43 -05:00
Bill Hoffman b7fa820118 ENH: add documentation support for modules 2005-12-14 13:51:08 -05:00
Brad King 290ffc01b6 ENH: Removing extra 64-bit search paths. They are now constructed automatically from the paths listed. 2005-04-07 14:27:01 -04:00
Brad King 76f9050026 ENH: Adding support for 64-bit library paths. Contributed by Peter Vanroose. 2005-04-07 13:46:02 -04:00
Bill Hoffman 96e2956ec8 Fix for bug Bug #1287 - cmake use MesaGL by default instead of libGL - Return to bug list 2005-04-05 16:24:03 -04:00
Andy Cedilnik ad4f98f3cf ENH: Cleanup. Use relative path to modules 2004-08-26 22:52:53 -04:00
Ken Martin 7965cfb339 fix to find opengl on some osf systems 2004-05-01 10:07:41 -04:00
Ken Martin 45878db508 update comments 2004-04-22 15:59:41 -04:00
Yves Starreveld a4d0758e22 ERR: Shouldn't be adding xlibs to opengllibs on osx 2004-03-27 13:20:55 -05:00
Brad King c624879fba ENH: Adding /usr/include/w32api for OpenGL header search. 2003-12-09 14:33:10 -05:00
Bill Hoffman 15fc30ae40 ENH: add checking for NOTFOUND 2003-01-31 15:01:37 -05:00
Bill Hoffman 81aee11c21 ENH: add checking for NOTFOUND 2003-01-31 14:39:49 -05:00
Ken Martin 56acc4bf2e merge from branch 2003-01-22 11:21:28 -05:00
Bill Hoffman 724c74122f BUG: fix for OSX with x11 gl stuff 2003-01-15 15:02:21 -05:00
Bill Hoffman 4cd69a3a2f quote the variable 2003-01-15 13:12:56 -05:00
Ken Martin 382d0d4474 better fix for win32 2003-01-09 15:54:29 -05:00
Ken Martin 75856e1762 update to not put PROJECT_SOURCE_DIR as OPENGL_PATH 2003-01-09 14:00:44 -05:00
Sebastien Barre 1d7c2eaf90 FIX: minor fix, OPENGL_INCLUDE_PATH was set 2 times 2002-11-12 10:47:43 -05:00
Sebastien Barre 15d27bbc42 FIX: typo + bring back the OPENGL_gl_LIBRARY path that can be used to find GLU (was wiped out from FindGLU) 2002-09-10 13:32:45 -04:00
Bill Hoffman 43d055eb7a Adding GLU to the OPENGL_LIBRARIES only if it is found. 2002-09-09 09:50:39 -04:00
Yves Starreveld 979bd1ec61 ERR: Fix opengl finding on osx 2002-09-06 14:03:47 -04:00
Ian Scott 079e8469ab Hide lots of values in the advanced list
Fix some bugs
OpenGL always needs X11 on Unix
2002-09-05 12:00:45 -04:00
Brad King 61ab3e3667 ERR: Still need to define OPENGL_INCLUDE_PATH in addition to the standard OPENGL_INCLUDE_DIR for backward compatability. 2002-09-04 09:24:50 -04:00
Ian Scott 0b288b6121 Fixed mistake in comments
Transferred OPENGL finding logic in from VXL
Added Some backwards compatibility with CMake1.4
2002-09-03 06:10:06 -04:00
Yves Starreveld c8ed9d7452 ERR: remove automatic Carbon framework on osx 2002-07-18 18:43:22 -04:00
Sebastien Barre 877610f2e9 ENH: define OPENGL_LIBRARY_PATH (path to OPENGL_LIBRARY) so that it can be used to search for other OpenGL-related libs 2002-06-14 11:45:57 -04:00
Sebastien Barre 5380afe02b ENH: make all OpenGL libs advanced, and add support for glu lib with Borland 2002-06-13 11:48:28 -04:00
Yves Starreveld 2ed628d59d find openGL in Carbon 2002-05-18 16:09:40 -04:00
Bill Hoffman e9907e51a9 better to find mac opengl 2002-04-17 08:28:07 -04:00
Bill Hoffman 2bdcc9ae7e ENH: fix debugging with borland 2001-12-03 17:01:40 -05:00
Bill Hoffman 5731bc9d54 ENH: change the syntax of the SET command, fix the combo box for larger strings 2001-05-24 12:57:33 -04:00
Bill Hoffman c43e3a4f3f fix opengl on hp 2001-05-21 15:16:19 -04:00
Ken Martin c244378a86 simple module 2001-05-02 14:08:52 -04:00