Commit Graph

25 Commits

Author SHA1 Message Date
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
Alex Neundorf a39ee97c6c Fix #11421: FindQt3.cmake doesn't honor the REQUIRED keyword
Alex
2010-11-09 21:51:59 +01:00
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Brad King a0e63cff1d FindQt3: Prefer (moc|uic)-qt3 names over (moc|uic)
On Debian moc and uic from Qt3 have '-qt3' suffixes.  The latter names
might come from Qt4, so prefer the version-specific names.

Patch from Modestas Vainius.  See issue #9659.
2009-10-05 10:25:36 -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
Alexander Neundorf db4bebe5c8 BUG: fix #7447, FindModulesExecuteAll test fails if both Qt3 and KDE4 can be
found in the system

Qt3 and Qt4 cannot be used together in one project.
Now Qt3/KDE3 and Qt4/KDE4 handle the case that this is done nevertheless
properly, i.e. they fail with FATAL_ERROR if it was REQUIRED and they fail
with just MESSAGE(STATUS ...) and RETURN() if it was not REQUIRED

BUG: make FindQt4 error out with FATAL_ERROR also if it was searched QUIET

Alex
2008-08-16 19:11:53 -04:00
Alexander Neundorf bf4b0bfdd7 STYLE: remove some unnecessary lines
STYLE: everything uppercase in this file

Alex
2008-08-16 17:14:01 -04:00
Bill Hoffman 858b221c32 ENH: try to module run test 2008-06-18 08:37:32 -04:00
Brad King e2ec3b671b ENH: Cleanup Find* modules with new HINTS feature
- The find_* commands now provide a HINTS option.
  - The option specifies paths to be preferred over the system paths.
  - Many Find* modules were using two find calls with NO_DEFAULT_PATH
    to approximate the behavior, but that blocked users from overriding
    things with CMAKE_PREFIX_PATH.
  - This commit uses the HINTS feature to get desired behavior in
    only one find command call.
2008-06-09 16:04:06 -04:00
Brad King 1a71290836 BUG: Fixed name of variable used to check version of uic executable. 2007-06-11 15:02:03 -04:00
Bill Hoffman 651fecee5b ENH: make sure findqt3 finds qt3 and not qt4 2006-11-22 13:30:59 -05:00
Alexander Neundorf 82e5ab5d4f ENH: automatically find Qt3 on SUSE, patch from Dirk Mueller and Stephan
Kulow

Alex
2006-08-30 13:51:22 -04:00
Alexander Neundorf bc266c1afd BUG: #3514: qt-mt3.lib wasn't found on windows
STYLE: remove some (now) unnecessary /usr/lib, /usr/local/lib, /usr/include
and /usr/local/include search paths

Alex
2006-08-27 13:59:18 -04:00
Bill Hoffman d2cb6fec6f ENH: try to find qt3 better 2006-05-07 13:04:57 -04:00
Alexander Neundorf 3eb75cdc76 BUG: fix QT_MIN_VERSION handling, it didn't work anymore (qt_version_str vs.
qt_version_str_lib)

Alex
2006-04-23 07:23:57 -04:00
Bill Hoffman e037fbaf7d ENH: try to fix non-clean dashboards 2006-03-06 14:08:15 -05:00
Bill Hoffman 7603244509 ENH: use program files env for searching 2006-02-28 10:27:30 -05:00
Bill Hoffman 4b0fd57bef ENH: fix module documenation to handle bad docs and fix qt3 docs 2005-12-15 09:19:23 -05:00
Bill Hoffman b7fa820118 ENH: add documentation support for modules 2005-12-14 13:51:08 -05:00
Brad King ed5493509e BUG: QT_DEFINITIONS should not be quoted. This addresses bug#2481. 2005-11-22 11:33:46 -05:00
Bill Hoffman 3587b472f8 ENH: add more libraries for qt3 2005-09-12 10:28:48 -04:00
Bill Hoffman 34170ed52e ENH: more qt changes 2005-09-12 09:32:21 -04:00
Bill Hoffman afbc9b7b07 ENH: clean up the find qt stuff some 2005-09-09 21:51:23 -04:00
Brad King c3a7f0ead5 ENH: Added support for finding qt-mtedu, the educational version of Qt. 2005-08-23 13:25:56 -04:00
Bill Hoffman dc1426b6a3 ENH: add new qt stuff from warfield@bwh.harvard.edu, thanks 2005-07-15 12:14:47 -04:00