Commit Graph

11247 Commits

Author SHA1 Message Date
Kris Thielemans
a5fe1712b2 FindHDF5: Remove unnecessary de-duplication of HDF5_LIBRARIES and friends
* When both debug and optimized libraries are found, the corresponding
  keywords were getting de-duplicated and breaking.
* CMake's link line generation de-duplicates in many cases anyway.
* Other find modules do not explicitly de-duplicate in general.

Fixes: #21670
2021-01-12 16:26:59 -05:00
Brad King
dadb13f546 FindHDF5: Simplify preprocessor setting de-duplication
Use `list(REMOVE_DUPLICATES)` directly.  For definitions the order
doesn't matter.  For include directories it is better to remove late
duplicates than early duplicates.
2021-01-12 16:24:25 -05:00
Brad King
0b32dfb292 Merge topic 'FindPostgreSQL-server-not-required'
f254e67bf6 FindPostgreSQL: Do not require pg_type.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5656
2021-01-11 11:27:04 -05:00
Brad King
05f4248e3d Merge topic 'cpp-modules'
39cbbb59a5 ninja: add experimental infrastructure to generate gcc-format modmap files
791b4d26d6 ninja: add experimental infrastructure to generate modmap files with dyndep
4b23359117 ninja: Add experimental infrastructure for C++20 module dependency scanning
f814d3b3c6 cmNinjaTargetGenerator: use $OBJ_FILE for the object
b0fc2993e1 Treat the '.mpp' file extension as C++ code
988f997100 cmScanDepFormat: Fix name of our internal tool in parse errors
dacd93a2db ninja: De-duplicate version numbers required for ninja features
533386ca29 cmStandardLevelResolver: Factor out helper to capture stoi exceptions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Acked-by: Shannon Booth <shannon.ml.booth@gmail.com>
Merge-request: !5562
2021-01-07 08:26:28 -05:00
Brad King
3734a96d98 Merge topic 'FindHDF5-dbg-and-rel'
5267ba9d63 FindHDF5: Fix finding both debug and release libs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5653
2021-01-06 14:08:27 -05:00
Ben Boeckel
b0fc2993e1 Treat the '.mpp' file extension as C++ code
This is the extension required in build2 for C++ module support.
2021-01-05 09:29:18 -05:00
Brad King
98084f902b Merge topic 'FindMPI-oneapi-single-quotes'
a5b223aa7f FindMPI: remove single quotes from include path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5654
2021-01-05 09:03:08 -05:00
Brad King
522015e04f Merge topic 'java-export-native_headers'
53235626a2 UseJava: enable exportation of native headers target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5658
2021-01-05 09:02:12 -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
Kris Thielemans
5267ba9d63 FindHDF5: Fix finding both debug and release libs
Use `target_link_libraries` to set `INTERFACE_LINK_LIBRARIES` so that
the `debug` and `optimized` keywords work.

In commit a8e0a6b3e4 (FindHDF5: Port changes from VTK, 2020-06-10,
v3.19.0-rc1~312^2~1) we added use of `HDF5_LIBRARIES`, but the value may
contain `debug` and `optimized` keywords.

Fixes: #21637
2021-01-04 14:26:38 -05:00
Eduard Valeyev
a5b223aa7f FindMPI: remove single quotes from include path
Intel OneAPI's MPI wraps include paths into single quotes,
remove them when sanitizing _MPI_INCLUDE_PATH

Fixes: #21634
2021-01-04 14:13:43 -05:00
Brad King
4d70299c66 Merge topic 'clang_win32_subsystem'
acfb54bb2f Clang: Support WIN32_EXECUTABLE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5648
2021-01-04 13:49:23 -05:00
Brad King
1883ef1cda Merge topic 'tests-bump-minver'
72e7c45e98 Tests: Bump CMake minimum required in tests to 2.8.12

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5644
2021-01-04 13:48:38 -05:00
Marc Chevrier
53235626a2 UseJava: enable exportation of native headers target 2020-12-29 17:14:20 +01:00
Brad King
95c59252c4 Merge topic 'FindGTK2-atkmmconfig'
9e5e312210 FindGTK2: Find atkmmconfig.h separately from atkmm.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5645
2020-12-23 09:43:57 -05:00
Brad King
809e80ed7c Merge topic 'cpack-nuget-linux'
dade75509f CPack/NuGet: Fix nuspec file generation for UNIX-style OS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5640
2020-12-23 09:39:40 -05:00
Chuck Atkins
72e7c45e98 Tests: Bump CMake minimum required in tests to 2.8.12
Since 3.19, CMake generates a deprecation warning when using a minimum
version less than 2.8.12.  This eliminates those warnings generated
during tests, which are typically hidden from the user and developer but
are being generated nonetheless.
2020-12-23 08:55:45 -05:00
Raul Tambre
acfb54bb2f Clang: Support WIN32_EXECUTABLE
Fixes #21613.
2020-12-23 12:39:09 +02:00
Craig Scott
88eefaac04 Merge topic 'fc-relative-SOURCE_DIR'
51595e5f01 FetchContent: Relative SOURCE_DIR override cannot be a hard error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5641
2020-12-22 15:49:37 -05:00
Jani Välimaa
9e5e312210 FindGTK2: Find atkmmconfig.h separately from atkmm.h
The former may be installed into libdir instead of includedir.
We already do this for several other components.

Fixes: #21627
2020-12-22 13:43:34 -05:00
iorikyu
dade75509f CPack/NuGet: Fix nuspec file generation for UNIX-style OS
Use forward slashes, which should work on both UNIX and Windows.
2020-12-22 09:30:33 -05:00
Brad King
440531e0f9 Merge topic 'external-project-drop-success'
850de767e9 ExternalProject: Silence step succeeded message when using Ninja

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5625
2020-12-22 09:14:01 -05:00
Brad King
1b02278fb1 Merge topic 'FindOpenSSL-win-arch'
a6e03b2e6f FindOpenSSL: Distinguish 32-bit and 64-bit search paths on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5630
2020-12-22 09:09:49 -05:00
Craig Scott
51595e5f01 FetchContent: Relative SOURCE_DIR override cannot be a hard error
Fixes: #21624
2020-12-22 11:09:18 +11:00
Ma Br
a6e03b2e6f FindOpenSSL: Distinguish 32-bit and 64-bit search paths on Windows
Fixes: #21611
2020-12-21 13:34:42 -05:00
Daan De Meyer
850de767e9 ExternalProject: Silence step succeeded message when using Ninja
When doing an ExternalProject superbuild with all output logged to
files, the output currently looks as follows:

```
[652/904] Performing install step for 'plasma-framework'
-- plasma-framework install command succeeded.  See also /root/build/kde/frameworks/plasma-framework/log/plasma-framework-install-*.log
[658/904] Performing build step for 'khtml'
-- khtml build command succeeded.  See also /root/build/kde/frameworks/khtml/log/khtml-build-*.log
[659/904] Performing install step for 'khtml'
-- khtml install command succeeded.  See also /root/build/kde/frameworks/khtml/log/khtml-install-*.log
[661/904] Performing configure step for 'krunner'
-- krunner configure command succeeded.  See also /root/build/kde/frameworks/krunner/log/krunner-configure-*.log
[661/904] Performing build step for 'krunner'
```

More specifically, because a success line is printed for every
succeeded step, we lose the advantage of Ninja's progress bar
which will now also print a new line instead of updating the same
link as happens when using Ninja in a normal CMake project.

By silencing the success message when using the Ninja generator,
Ninja's progress bar works as expected and updates inline instead
of printing a new line for each progress update.

With this change, the above output is reduced to a single line
progress bar:

```
[661/904] Performing build step for 'krunner'
```
2020-12-17 17:32:57 +00:00
Craig Scott
cc8162a981 CMakeDetermineCompilerId: Ensure CMAKE_EXECUTABLE_FORMAT is INTERNAL
Fixes: #21607
2020-12-17 21:09:46 +11:00
Brad King
25a1cdef95 Merge topic 'FindQt3-find-sig'
38fce6d23b FindQt3: Add missing NAMES/PATHS keywords to find_ calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5611
2020-12-15 07:44:18 -05:00
Marc Chevrier
55c3b6a77e CMakePackageConfigHelpers: Relax restrictions on version range 2020-12-15 09:24:09 +11:00
Marc Chevrier
7f44760991 CMakePackageConfigHelpers: Relax restrictions on version range 2020-12-14 14:42:26 +01:00
Brad King
38fce6d23b FindQt3: Add missing NAMES/PATHS keywords to find_ calls
These are needed when using `PATH_SUFFIXES` to get the full signatures.

Fixes: #21594
2020-12-14 08:38:16 -05:00
Brad King
82b25be80a Merge topic 'FindMatlab-MCR'
9c360b9eea FindMatlab: Fix search for MCR
bda5e2ac8f FindMatlab: Only include engine and dataarray libraries if they are found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5600
2020-12-14 07:28:42 -05:00
Brad King
6aff058ab4 Merge topic 'FindGLUT-macos-tbd' into release-3.19
d29d034e2e FindGLUT: Handle Mojave and Big Sur 'tbd' framework files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5601
2020-12-14 07:11:07 -05:00
Brad King
528fbd61b7 Merge topic 'FindGLUT-macos-tbd'
d29d034e2e FindGLUT: Handle Mojave and Big Sur 'tbd' framework files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5601
2020-12-14 07:11:07 -05:00
Brad King
41d8c20221 Merge topic 'macos-homebrew-apple-silicon'
1a5c1a68b6 macOS: Add /opt/homebrew to CMAKE_SYSTEM_PREFIX_PATH on Apple Silicon

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Fons Rademakers <fons.rademakers@cern.ch>
Merge-request: !5602
2020-12-14 07:10:04 -05:00
Brad King
1a5c1a68b6 macOS: Add /opt/homebrew to CMAKE_SYSTEM_PREFIX_PATH on Apple Silicon
According to https://brew.sh/2020/12/01/homebrew-2.6.0/ the `/opt/homebrew`
directory is recommended for installing ARM architecture brew packages.

Fixes: #21585
2020-12-11 13:07:17 -05:00
Brad King
794aa36b1f Merge topic 'apple-silicon-host-arch'
b7f0327dcd Tests: Cover macOS host architecture selection on Apple Silicon hosts
5f882f6ce5 macOS: Offer control over host architecture on Apple Silicon hosts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5589
2020-12-11 13:05:34 -05:00
Nikolaj Fogh
9c360b9eea FindMatlab: Fix search for MCR
Fixes: #21068, #21582
2020-12-11 11:30:59 -05:00
Nikolaj Fogh
bda5e2ac8f FindMatlab: Only include engine and dataarray libraries if they are found 2020-12-11 11:27:35 -05:00
Robert Maynard
d29d034e2e FindGLUT: Handle Mojave and Big Sur 'tbd' framework files 2020-12-11 11:01:30 -05:00
Brad King
5f882f6ce5 macOS: Offer control over host architecture on Apple Silicon hosts
Since commit b6c60f14b6 (macOS: Default to arm64 architecture on Apple
Silicon hosts, 2020-09-28, v3.19.0-rc1~63^2) we use `sysctl` to detect
that we are running on Apple Silicon in a way that pierces Rosetta.
This always sets `CMAKE_HOST_SYSTEM_PROCESSOR` to be `arm64` on such
hosts.  However, macOS offers strong support for running processes under
an emulated `x86_64` architecture.

Teach CMake to select either `arm64` or `x86_64` as the host
architecture on Apple Silicon based on the architecture of its own
process.  When CMake is built as a universal binary, macOS will select
whichever slice (architecture) is appropriate under the user's shell,
and `CMAKE_HOST_SYSTEM_PROCESSOR` will match.

Also offer a `CMAKE_APPLE_SILICON_PROCESSOR` variable and environment
variable to provide users with explicit control over the host
architecture selection regardless of CMake's own architecture.

Finally, if `CMAKE_OSX_ARCHITECTURES` is not set, pass explicit flags to
the toolchain to use selected host architecture instead of letting the
toolchain pick.

Fixes: #21554
2020-12-10 12:08:13 -05:00
Brad King
9109475bfb Merge topic 'cpp23'
9f3c70a333 CUDA, CXX, OBJCXX: C++23 support with Clang 12
af7e1545c8 CUDA, CXX: Remove HAS_FULL_SUPPORT for C++17 and 20

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5576
2020-12-10 07:00:17 -05:00
Brad King
86157e219d Merge topic 'EML-Support'
d6df83a690 Find{BLAS,LAPACK}: Add support for Elbrus Math Library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5590
2020-12-10 06:58:51 -05:00
Brad King
9f66eb74a5 Merge topic 'ispc-system-includes' into release-3.19
8da25e4a3c ISPC: Treat system includes as '-I' includes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5591
2020-12-10 06:57:04 -05:00
Brad King
e966c23be2 Merge topic 'ispc-system-includes'
8da25e4a3c ISPC: Treat system includes as '-I' includes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5591
2020-12-10 06:57:04 -05:00
Robert Maynard
8da25e4a3c ISPC: Treat system includes as '-I' includes
ISPC doesn't have specific syntax for system includes.
2020-12-09 11:33:44 -05:00
Brad King
2236e910b6 Merge topic 'gen-vs-intel-dpcpp-compiler-support'
7808cbd644 CMakeDetermineCompilerId: support Intel DPC++ compiler toolset for VS gen

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5579
2020-12-09 09:15:49 -05:00
Igor S. Gerasimov
d6df83a690 Find{BLAS,LAPACK}: Add support for Elbrus Math Library
http://mossigplan.acm.org/EML_introduction_engl.pdf
2020-12-09 16:49:41 +03:00
Raul Tambre
9f3c70a333 CUDA, CXX, OBJCXX: C++23 support with Clang 12
Clang 12 landed initial support for C++23 language mode flag -std={c|gnu}++2b
in commit 6627a3c2873fdf7ccba1a1573371079be48b36e8.
2020-12-08 18:43:59 +02:00
Raul Tambre
af7e1545c8 CUDA, CXX: Remove HAS_FULL_SUPPORT for C++17 and 20
CMake has no features for C++ versions past 14 and it seems unlikely we'd want
to add any.
Remove the related code.
2020-12-08 18:42:24 +02:00