Commit Graph

60 Commits

Author SHA1 Message Date
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Nikita Nemkin
d138555959 Help: Use Title Case for all "Imported Targets" sections 2025-01-31 12:23:29 -05:00
Brad King
7afa58b15d Modules/Find*: Include FindPackageHandleStandardArgs normally
Since commit d74210a8bd (CMP0017: Remove support for OLD behavior,
2024-11-17) we can rely on CMP0017's NEW behavior unconditionally.
Calling `include(FindPackageHandleStandardArgs)` in a builtin module
will always get the builtin `FindPackageHandleStandardArgs`.
2025-01-30 08:53:12 -05:00
Brad King
c283aafe62 CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
Peter Kokot
1a8e43d57d
FindPackageHandleStandardArgs: Clarify the FOUND_VAR option
The `find_package_handle_standard_args(FOUND_VAR)` is deprecated as of
CMake 3.3 and both the `<PackageName>_FOUND` and the upper-cased
`<PACKAGE_NAME>_FOUND` are set with or without using this option.
Additionally, find modules and docs are also synced with this to make it
clearer.
2024-12-31 02:07:16 +01:00
Juan Ramos
3cd64287fe Modules: Fix CMP0159 warnings in modules when tracing
Closes: #25829
2024-03-29 13:51:59 -07:00
Brad King
25644a78de FindPostgreSQL: Add support for version 16
Fixes: #25292
2023-10-02 14:44:04 -04:00
Brad King
80ba2cccfc FindPostgreSQL: Add support for version 15 2023-06-16 08:21:04 -04:00
parkesb
f799e0f23d FindPostgreSQL: Add brew-style directories to search path
As of 14.5, homebrew names PostgreSQL directories with the version
number, e.g., `postgresql@14`.
2022-08-31 10:37:13 -04:00
Even Rouault
23671318f3 FindPostgreSQL: add support for PostgreSQL 14 2022-04-11 09:00:18 -04:00
Kai Pastor
fcc0119af0 FindPostgreSQL: Update known versions in documentation 2022-03-17 09:41:57 -04:00
Alexey Edelev
8b066f1a65 FindPostgreSQL: Add server component
Require the server-specific artifacts only if the Server
component is requested.

Issue: #17223
2021-01-15 10:33:55 -05:00
Alexey Edelev
f254e67bf6 FindPostgreSQL: Do not require pg_type.h
In systems where PostgreSQL has separate developer packages for
server and client libraries `PostgreSQL_TYPE_INCLUDE_DIR` is not
specified. According to initial logic server part was not required
but was accidentally added to `REQUIRED_VARS` during the migration to
`find_package_handle_standard_args`.

Fixes: #17223
2021-01-04 14:36:59 -05:00
Nikita Nemkin
8fea95319b Help: Add .. versionadded directives to module docs
Issue: #19715
2020-12-02 21:00:30 +05:00
Pavel Cernohorsky
f3f09f1c96 FindPostgreSQL: support version 13 2020-11-05 07:59:45 -05:00
Brad King
c029829665 Merge topic 'FindPostgreSQL-macports-libsuffix'
24ae45fb0c FindPostgreSQL: also search for libraries in the MacPorts suffix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4043
2019-11-15 09:01:37 -05:00
Ben Boeckel
24ae45fb0c FindPostgreSQL: also search for libraries in the MacPorts suffix 2019-11-13 08:41:43 -05:00
Ben Boeckel
e992d62b7e FindPostgreSQL: support version encoding used in pre-10 releases
With the 10.x release, PostgreSQL upstream started encoding the version
as `MMmmmm` where `M` is major and `m` is minor. Prior to that, `MMmmPP`
was used where `P` was the patch number. Detect this difference and
decode it based on the used encoding.

Fixes: #19912
2019-11-04 16:38:52 -05:00
Ben Boeckel
ec43d96657 FindPostgreSQL: support macports installation scheme
Macports installs into `include/postgresql${suffix}`. Add this to the
list of supported suffixes. Also copy the non-server
`postgresql/${suffix}` path.
2019-10-11 11:04:13 -04:00
Ben Boeckel
908dff41c6 FindPostgreSQL: support version 12 2019-10-11 11:04:13 -04:00
Brad King
d21b890a4c FindPostgreSQL: Fix regression in computation of library directory
Since commit 368bcba28a (FindPostgreSQL: Find debug lib, imported
configs, 2019-05-09, v3.15.0-rc1~93^2) the `PostgreSQL_LIBRARY` variable
may contain a list and therefore should not be passed to the
`get_filename_component` command directly.  Instead spell out the logic
to compute `PostgreSQL_LIBRARY_DIR` from one of the per-configuration
variables.

Fixes: #19444
2019-07-02 07:32:14 -04:00
Andrei Lebedev
368bcba28a FindPostgreSQL: Find debug lib, imported configs
* Add find_library calls for debug and release
* Set imported configs for corresponding libraries in imported target
* Set debug/optimized in PostgreSQL_LIBRARIES

Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
2019-05-20 11:29:04 -04:00
Ben Boeckel
575e2cc35d FindPostgreSQL: extract the actual version number
The `PG_VERSION` variable can be mangled by distributions to indicate
things like the name of the distro and package build numbers.

However, `PG_VERSION_NUM` is new in 8.2 (2006), so keep the old
extraction code around for old versions.
2018-11-05 11:13:33 -05:00
Ben Boeckel
d2235fd253 FindPostgreSQL: add an imported target 2018-11-01 13:23:33 -04:00
Brad King
7a801b7dfb FindPostgreSQL: Modernize documentation layout 2018-11-01 13:22:01 -04:00
Brad King
5dc4bd1c90 Merge topic 'FindPostgreSQL-11'
eea851bc2e FindPostgreSQL: Search for version 11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Mateusz Łoskot <mateusz@loskot.net>
Merge-request: !2547
2018-10-31 09:32:38 -04:00
Sylvain Joubert
eea851bc2e FindPostgreSQL: Search for version 11 2018-10-30 10:04:09 +01:00
Kitware Robot
df4ed1e9ff Help: Convert remaining modules to block-style comments 2018-10-22 11:09:34 -04:00
Brad King
ce629c5dde Merge topic 'FindPostgres_support_for_v10'
9417a6d3 FindPostgreSQL: Add support for PG10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1635
2018-01-09 09:45:45 -05:00
Egor Pugin
9417a6d322 FindPostgreSQL: Add support for PG10 2018-01-09 09:43:41 -05:00
Luz Paz
3ab7bf8285 Various typo fixes
Some are user-facing. Others are source comments.
2018-01-04 06:52:01 +11:00
Rolf Eike Beer
5ffee691ee FindPostgreSQL: automatically find installations from yum.postgresql.org
In commit v3.3.0-rc1~4^2 (FindPostgreSQL: Search some more common
packaging locations) the PostgreSQL_ADDITIONAL_SEARCH_PATHS variable was
removed. This was used e.g. by osm2pgsql to be able to build on CentOS
with recent PostgreSQL versions. At least add those locations from
yum.postgresql.org, which is a more or less official location.
2017-01-10 09:52:42 -05:00
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
Tamar Kranenburg
8dac3af03c FindPostgreSQL: Search for version 9.6 2016-09-18 16:39:18 +02:00
Tamar Kranenburg
84039a6aa2 FindPostgreSQL: Correct comment about known postgres versions 2016-09-18 16:39:18 +02:00
Nils Gladitz
58677c327f FindPostgreSQL: Fix initialization of PostgreSQL_LIBRARIES 2016-07-14 18:18:26 +02:00
Tamar Kranenburg
5225e0048c FindPostgreSQL: Search for version 9.5 2015-10-12 10:43:52 -04:00
Tamar Kranenburg
d4fd30d8d8 FindPostgreSQL: Search some more common packaging locations
Use PATH_SUFFIXES to search more common packaging locations.

On Windows, we can use suffixes to search in the standard Program Files
locations without hard-coding the C:/ path.

On Ubuntu/Debian, starting with PostgreSQL 9.3 the header file pg_type.h
is moved to a separate package (from libpq-dev to postgresql-server-dev)
and consequently the file pg_type.h is moved to a new location:

  /usr/include/postgresql/<version>/server/catalog/pg_type.h

While at it, use separate PATH_SUFFIXES variables for library, type and
include (this is merely an optimization).
2015-06-01 11:01:00 -04:00
Tamar Kranenburg
8bd9505976 FindPostgreSQL: Add help text for PostgreSQL_LIBRARY cache entry
The PostgreSQL_LIBRARY_DIR_MESSAGE variable was set with the
needed text but never referenced.
2015-06-01 10:50:27 -04:00
Tamar Kranenburg
a68e9b7cae FindPostgreSQL: Document PostgreSQL_LIBRARY_DIRS result variable 2015-06-01 10:47:59 -04:00
Tamar Kranenburg
cc3aee048c FindPostgreSQL: Search for versions 9.2, 9.3, and 9.4 2015-06-01 10:47:02 -04:00
Tamar Kranenburg
6a2851a144 FindPostgreSQL: Remove extra whitespace after command open parens 2015-06-01 10:46:12 -04:00
Tamar Kranenburg
b7ca6f9037 FindPostgreSQL: Remove unused lines 2015-06-01 10:44:25 -04:00
Chuck Atkins
741f29cc00 FindPostgreSQL: Fix for pg_config in multilib configurations.
Some platforms, Fedora 20 and RHEL 7 in particular, will have multiple
pg_config_${arch}.h files all included by the top level pg_config.h.
This checks all of the available pg_config*.h headers for version
information.
2014-09-02 10:35:37 -04: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
Pere Nubiola i Radigales
4cbc1e5682 Find PostgreSQL headers on Debian
Fixes Debian bug 665721 (http://bugs.debian.org/665721)
2012-10-15 21:28:20 +02:00
Rolf Eike Beer
ff0d1a8d84 include FPHSA from current directory in all modules 2012-09-09 00:39:47 +02:00
Rolf Eike Beer
b04650e163 use the find_* functions ENV parameter
Instead of directly passing $ENV{SOMEVAR} to a find_* call pass in ENV SOMEVAR.
This will make sure the paths will get correctly handled through different
platforms, especially on Windows.

Also fixes one place where paths with windows delimiters (\) were hardcoded to
use forward slashes.
2012-08-14 21:02:58 +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