Commit Graph

58 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
Brad King 44efb0a747 Merge topic 'FindHDF5-is-parallel'
b61eab24 FindHDF5: Fix regression in providing HDF5_IS_PARALLEL
2016-09-03 08:10:12 -04:00
Brad King 61b99cdeaa Merge topic 'FindHDF5-fix-hl-fortran'
befe8648 FindHDF5: Fix regression in finding hdf5hl_fortran
2016-09-03 08:10:09 -04:00
Brad King befe8648a3 FindHDF5: Fix regression in finding hdf5hl_fortran
Refactoring in commit v3.6.0-rc1~72^2 (HDF5: Rework component searching
to correctly find HL for all bindings, 2016-05-12) accidentally dropped
the name `hdf5hl_fortran` from the list of library names and replaced it
with `hdf5_hl_fortran`.  IIUC the latter name is when HDF5 is built with
CMake and the former name is for other build systems.  Since this is the
non-CMake code path, user the former name.

Closes: #16233
2016-09-02 15:09:47 -04:00
Brad King b61eab249f FindHDF5: Fix regression in providing HDF5_IS_PARALLEL
Since commit v3.6.0-rc1~85^2 (HDF5: Refactor the use of compiler
wrappers, 2016-04-01) we have additional code paths that find HDF5 and
suppress the original search logic.  Report HDF5_IS_PARALLEL from these
other code paths too.

Closes: #16257
2016-09-02 15:06:52 -04:00
Ben Boeckel 2bdba83e4b issues: update references to the CMake issue tracker
References to specific comments are left as-is since comments were not
migrated.
2016-08-15 09:34:06 -04:00
Chuck Atkins 8eb0b56c2a FindHDF5: Make sure compile definition vars keep the -D flag 2016-08-02 10:34:51 -04:00
Chuck Atkins d5e4516ec2 FindHDF5: Cleanup inconsistent use of HDF5_ROOT 2016-07-12 15:32:10 -04:00
Chuck Atkins 4ece8bdd0f FindHDF5: Properly fail when required components are not found. 2016-07-12 13:40:41 -04:00
Chuck Atkins 87c1cd9c51 FindHDF5: Fix h5cc arg parsing to work with homebrew on Mac 2016-07-12 11:08:11 -04:00
Robert Maynard 234deec2ea FindHDF5: create all the *_LIBRARIES when using hdf5-config.cmake 2016-06-24 15:28:23 -04:00
Robert Maynard 963b576fd2 FindHDF5: cache the correct path to the high level libraries 2016-06-24 15:26:22 -04:00
Robert Maynard 9f2728cef3 FindHDF5: When component targets not found fallback to compiler wrappers 2016-06-23 12:31:26 -04:00
Robert Maynard 149539d9c2 FindHDF5: Handle HDF5 builds with non-suffixed components 2016-06-23 10:57:58 -04:00
Robert Maynard f30b0fec74 FindHDF5: correctly add lang to each component target name. 2016-06-23 10:56:29 -04:00
Chuck Atkins f11243d13e FindHDF5: Add backwards compatability for already-found searches 2016-06-02 14:46:32 -04:00
Chuck Atkins fdfb0c0649 HDF5: Rework component searching to correctly find HL for all bindings 2016-05-12 13:54:58 -04:00
Brad King 3b3afefb90 Merge topic 'fix-hdf5-for-compiler-wrapers'
00405af0 HDF5: Refactor the use of compiler wrappers
2016-05-10 14:40:45 -04:00
Chuck Atkins 00405af0f1 HDF5: Refactor the use of compiler wrappers
* Make work with HDF5 compiler wrappers as the primary compiler (Cray)
 * Accept options used by compiler wrappers instead of just seeding
   search parameters
 * Only search for libraries if the first 2 fail
2016-05-09 10:20:39 -04:00
FARBOS Arnaud 313676c9f0 FindHDF5: Add another debug suffix
HDF5 1.8.16 (and likely others) names its debug libraries with a
`_debug` suffix intsead of `d`.
2016-05-02 11:31:35 -04:00
Brad King da7276cf94 Replace http://www.cmake.org URLs with https://cmake.org
The latter is now the preferred URL for visiting cmake.org with a
browser.  Convert using the shell code:

 git ls-files -z | xargs -0 sed -i 's|http://www\.cmake|https://cmake|g'
2015-09-25 15:47:39 -04:00
Paul Romano fd26a19afc FindHDF5: Add NAMES_PER_DIR and introduce HDF5_PREFER_PARALLEL
The calls to find_program now use NAMES_PER_DIR so that the first executable
(e.g. h5pcc) appearing on their PATH will get chosen. The HDF5_PREFER_PARALLEL
variable swaps the search order when it is set to true in the event that a
directory being search contains both h5cc and h5pcc.
2015-09-11 14:27:08 -04:00
Paul Romano f7f73df1b3 FindHDF5: Add hdf5_hl to list of libraries to search for Fortran_HL
When the Fortran_HL component is specified, the hdf5_hl library is not included
in HDF5_LIBRARIES which causes a bunch of undefined references at link
time. This commit adds hdf5_hl to the list of libraries to search for when the
Fortran_HL component is specified.
2015-09-01 10:56:51 -04:00
Paul Romano 19e7db07e3 FindHDF5: Fix support for HL and Fortran_HL components
Define HDF5_{Fortran_,}HL_COMPILE_LINE so that HDF5_{Fortran_,}HL_INCLUDE_DIR
and HDF5_{Fortran_,}HL_LIBRARIES are found when the macro is invoked for HL and
Fortran_HL components.  (Use patch from debian cmake-data package.)
2015-09-01 10:56:40 -04:00
Axel Huebl 5685817874 FindHDF5: Add version support
Detect the HDF5 version and set HDF5_VERSION just as we
detect HDF5_IS_PARALLEL from the header already.
2015-05-13 10:00:55 -04:00
Brad King 4bd122ad9c FindHDF5: Check for a few H5pubconf*.h name variants
Some distros package H5pubconf.h as "H5pubconf-32.h" or "H5pubconf-64.h"
depending on the architecture.  Look for all of these names.
2015-05-13 09:59:43 -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
Rolf Eike Beer 5bd48ac534 Replace string(REGEX REPLACE) with string(REPLACE) where possible
The simple replacement is much faster.
2014-04-14 18:17:05 +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
Brad King 0f05961f03 FindHDF5: Fix regression in per-configuration library selection
When FindHDF5 was first added in commit e6734068 (Add HDF5 find
module..., 2009-08-24) it contained a workaround for a bug in
SelectLibraryConfigurations that did not transform lists correctly.
That bug was fixed by commit 5797512c (SelectLibraryConfiguration:
generate correct output when input vars are lists, 2012-07-28).  Then
refactoring in commit 04d4dc33 (SelectLibraryConfigurations: Use
-NOTFOUND instead of copying the vars, 2013-07-08) changed undocumented
behavior on which the original workaround relied.  The result puts
entries like HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND in HDF5_LIBRARIES.

Fix this by dropping the original workaround since the underlying issue
has been fixed anyway.  Use the HDF5_${LIB}_LIBRARY selected by the call
to select_library_configurations directly.
2013-09-19 13:35:01 -04:00
Rolf Eike Beer 8ebf74b02f Find* (and some other): use ${CMAKE_CURRENT_LIST_DIR} in include()
This solves a lots of warnings, e.g. in the FindModulesExecuteAll test. If the
installed version on the system is rather old this may even lead to bugs, e.g.
https://bugs.gentoo.org/show_bug.cgi?id=436540
2012-11-04 05:55:37 +01:00
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
Will Dicharry ad218e435d Added HDF5 high level Fortran bindings to available components. 2011-08-02 10:48:14 -06:00
Will Dicharry e38216c6e9 Remove unnecessary mark_as_advanced from FindHDF5. 2011-05-25 13:19:26 -06:00
Will Dicharry 93ba19e070 FindHDF5 ensures good link lines when libraries are duplicated.
Duplicates must be removed from the beginning of the link libraries
to ensure unresolved symbols can be found.
2011-05-25 12:53:28 -06:00
Will Dicharry 0584701ae4 Fix for bug 11752, mixed debug and release libraries. 2011-05-25 12:38:54 -06:00
Will Dicharry 4e12284424 Use HDF5_FOUND to control autoconf and CMake built FindHDF5. 2011-05-25 12:34:21 -06:00
Will Dicharry 2ba826e060 Use CMAKE_CURRENT_LIST_DIR to locate FindPackageHandleStandardArgs. 2011-05-24 12:53:49 -06:00
Will Dicharry 3978f3221f Add logic for CMake built HDF5 install.
The find module calls find_package( HDF5 QUIET NO_MODULE ). If that succeeds,
the find module variables are set based on the imported target locations.
2011-05-16 15:41:18 -06:00
Will Dicharry 063ac873ce HDF5 high level library is a find COMPONENT now.
The HDF5 high level library was originally hard coded as a dependency when the C
bindings are desired. The high level API is now requested as a COMPONENT.
2011-05-16 15:36:47 -06:00
Tim Gallagher 34ea179013 Modified the FindHDF5.cmake file to locate the Fortran bindings. 2011-05-16 15:35:57 -06: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 ce28737c93 Remove usage of CMAKE_CURRENT_LIST_DIR now that we have CMP0017
This puts the new search behaviour for included files in action, i.e.
now when a file from Modules/ include()s another file, it also gets the
one from Modules/ included, i.e. the one it expects.

Alex
2011-01-04 08:20:08 -05:00
David Cole b0fb2ad3e1 Merge topic 'AddCMAKE_CURRENT_LIST_DIR'
b011840 Use absolute path to FindPackageHandleStandardArgs.cmake everywhere
41e4f1a Add automatic variable CMAKE_CURRENT_LIST_DIR(dir of CMAKE_CURRENT_LIST_FILE)
f9fc79c Remove trailing whitespace
2010-10-19 15:53:16 -04:00
Brad King 3445532652 FindHDF5: Fix typo in parallel-IO support check (#11291) 2010-10-11 09:35:46 -04:00
Alex Neundorf b01184022b Use absolute path to FindPackageHandleStandardArgs.cmake everywhere
This is to avoid getting an (older) copy of FPHSA.cmake which is
e.g. installed with KDE 4.5.0 and 4.5.1.

Alex
2010-09-28 22:30:31 +02:00
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Brad King 4ce7ffbfc5 FindHDF5: Fix Windows compile-line parsing
We modify the signature of _HDF5_parse_compile_line to pass the command
line variable name rather than the command line itself.  Otherwise the
CMake language MACRO implementation tries to parse the command line as
CMake syntax, which does not like backslashes.
2009-12-18 10:13:01 -05:00
Will Dicharry 7bc90c3edf Set value of HDF5_INCLUDE_DIR for backwards compatibility.
CMake 2.8 was released with the FindHDF5 module setting HDF5_INCLUDE_DIR rather
than the correct plural HDF5_INCLUDE_DIRS. Since this went into a release, it is
now necessary to set the singular for backwards compatibility.
2009-12-15 13:26:44 -05:00
Alexander Neundorf e5efd87b31 Fix parallel HDF5 detection (#9982)
Alex
2009-12-09 15:17:55 -05:00