Commit Graph

41 Commits

Author SHA1 Message Date
Brad King 86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Rolf Eike Beer 0645eedb71 FindQt[34]: Prefer matching versioned tool names
After finding qmake we search in QT_BINARY_DIR for the other Qt tools.
Try all versioned executable names before trying the plain executable name.
This makes it much more likely that if 2 different major versions are installed
in the same prefix CMake will be able to detect a proper set of tools.
2014-05-22 08:56:05 -04:00
Rolf Eike Beer b0b4b4602f Remove .* expressions from beginning and end of MATCHES regexs
All these expressions work the same:
  "foo"
  ".*foo.*"
  "^.*foo.*$"

This assumes that the "Intel*" expressions were meant to be "Intel.*".
2014-04-14 18:17:11 +02:00
Kitware Robot f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00
Amit Kulkarni f80ccac158 OpenBSD: Add paths for Qt3/Qt4
Handle OpenBSD specific paths in Qt3/Qt4, allowing concurrent building
and installation.  Some common programs are renamed with suffixes of
either 3 or 4.  Also, allow qt3/qt4 installed under /usr/local to be
searched and recognized appropriately.
2012-12-05 13:09:43 -05:00
Stephen Kelly 325214900b Fix casing of 'Qt' in docs, comments and user-visible strings.
QT (cue-tea) is Apple QuickTime.
Qt (cute) is the C++ framework.
2012-08-28 11:24:55 +02:00
David Cole c79dd4d951 Merge topic 'read-less-from-version-headers'
4be6783 read less from version headers into variables
2012-08-20 15:42:34 -04:00
Rolf Eike Beer 4be6783711 read less from version headers into variables
Instead of reading the whole file using file(READ) and later matching on the
whole file use file(STRINGS ... REGEX) to get only those lines we are
interested in at all. This will make the list much smaller (good for debugging)
and also the regular expressions will need to match on much smaller strings.

Also unset the content variables once they are not used anymore.
2012-08-19 13:54:56 +02:00
Rolf Eike Beer cfe4ac4b41 use PATH_SUFFIXES to simplify find_* calls
Especially remove "lib64" when the given paths are all Unix ones and "lib" is
also explicitely given. In that case CMake will search "lib64" anyway for
platforms where it is known to make sense.
2012-08-14 21:03:23 +02:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Rolf Eike Beer 678c24d230 FindQt3: fix detection of Qt3 include directory
The include directory is likely not inside ../bin
2012-03-02 18:08:37 +01:00
Rolf Eike Beer 91a1670f47 FindQt3: let FPHSA handle the version selection 2012-03-02 18:08:37 +01:00
Rolf Eike Beer 9dae4d65d7 FindQt3: fix version extraction for versions with letters 2012-03-02 18:08:37 +01:00
Rolf Eike Beer 2cd898d54b FindQt3: fix warning when Qt3 is not found
-- Could NOT find Qt3 (missing:  QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE)
CreateProcess failed QT_MOC_EXECUTABLE-NOTFOUND -v
CreateProcess failed QT_UIC_EXECUTABLE-NOTFOUND -version
2012-03-02 17:02:03 +01:00
Clinton Stimpson f5066217db Fix paths/hints for finding qtmain. 2012-02-20 13:02:11 -07: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
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