Commit Graph

12362 Commits

Author SHA1 Message Date
Brad King 3a8b6653dc MSVC: Use -external:I flag without space to support Clang tools
Since commit f29e1874ad (Compiler/MSVC: use the `-external:I` flag for
system includes, 2020-05-19, v3.22.0-rc1~593^2) we use the new flag
followed by the include directory as a separate argument.  Some versions
of `clang-cl` and `clang-tidy` do not support the flag unless the
include directory is attached to it, so use that form instead.

Fixes: #22979
2022-01-11 16:36:36 -05:00
Brad King ddc6be2c19 Merge topic 'FindLTTngUST-fix-version-detect'
4ce5765a86 FindLTTngUST: Fix version component extraction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6828
2022-01-11 08:04:33 -05:00
Evgeniy Shcherbina 8b85b10fb3 GoogleTest: Add handling for square brackets in test names
If a test name contains a square bracket (due to parameters) then it
breaks gtest_discovery_test() function in some not-so-predictable
way. That happens due to the special meaning these brackets have in
the CMake language and they can't be escaped universally.

So the following treatment has been implemented:

* Every occurrence of ('[' | ']') in a test name gets replaced with
the corresponding placeholder ("__osb_*" | "__csb_*") before the
Google Test output processing and gets replaced back before adding
a new test to CTest, keeping the original test name intact in the
CTest output.

The placeholders are chosen that way to minimize the chance of
clashing with something in the user tests but even if the default
ones would clash with something then they are enhanced to not clash
with anything (hence "_*" at the placeholder's end).

* The GTest output gets searched for the default test name guards
("[=[" | "]=]") and if they are found a new one gets generated until
the one is found which can safely encompass any test name. The
search is quite simple: find the least amount of '=' which would
allow escaping any test.

* The resulting ${TEST_LIST} variable will contain every test but
tests with square brackets as there is no way to make sure such
tests won't break the list altogether.

Fixes: #23039
2022-01-11 09:00:53 +03:00
Norbert Lange 4ce5765a86 FindLTTngUST: Fix version component extraction
The regex was greedy and slurped away all but the last digit,
so 2.13.1 was for ex. detected as 2.3.1.
Fix this by expecting preceding whitespace.
2022-01-10 17:56:48 -05:00
Robert Maynard d2be9d0f93 Fortran: Support searching for the nvfortran executable
Instead of relying on the PGI symlinks (pgf95/pgf90/...) to always exist.
2022-01-10 09:48:25 -05:00
Craig Scott d73fc5dd2a ExternalProject: Fix misuse of IS_NEWER_THAN in timestamp checks
This change was originally made in 404cddb7bb (ExternalProject:
Fix misuse of IS_NEWER_THAN in timestamp checks, 2021-02-21),
but was reverted by 57d442e182 (Revert ExternalProject and
FetchContent refactoring, 2021-03-10) due to regressions from
other changes. Reapply this fix on its own, since it is still valid.

When using a file system which only has second resolution timestamps,
there is a reasonably high likelihood of timestamps being the same.
The IS_NEWER_THAN test returns true when timestamps are the same,
so don't redo downloads when they match exactly.
2022-01-08 20:51:44 +11:00
Brad King b996e576c2 Merge topic 'GoogleTest-dots'
1f9554d4e9 GoogleTest: Fix regex matching all dots in the suite name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6822
2022-01-07 10:23:54 -05:00
Brad King 7b1099a52f Merge topic 'cmcldeps-cross'
d49e168e1b Ninja: Do not use cmcldeps for RC on non-Windows hosts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dmitry Mikushin <dmitry@kernelgen.org>
Merge-request: !6843
2022-01-07 09:43:39 -05:00
Brad King efe3410cbb Merge topic 'msvc-arm64ec'
26f52508f2 MSVC: update arm64ec default flags and lib

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6841
2022-01-07 09:42:53 -05:00
Brad King 46b34407cb Merge topic 'armasm-6.17'
c2777ed008 ASM: Fix identification of armasm 6.17+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6833
2022-01-07 09:40:15 -05:00
Francesco Guastella 1f9554d4e9 GoogleTest: Fix regex matching all dots in the suite name 2022-01-07 09:25:57 -05:00
Martin Storsjö d49e168e1b Ninja: Do not use cmcldeps for RC on non-Windows hosts
The `cmcldeps` executable is only built on Windows.  If running MSVC on
a different OS (with various compatibility wrapping), don't try to use
`cmcldeps`, as the executable doesn't exist.

Fixes: #21760
2022-01-06 15:42:45 -05:00
moyo1997 26f52508f2 MSVC: update arm64ec default flags and lib
Update the support added by commit 4ea3a88625 (MSVC: Add support for
targeting ARM64EC, 2020-12-30, v3.20.0-rc1~121^2).

Add `softintrin.lib` to `CMAKE_C_STANDARD_LIBRARIES_INIT`.

Remove `/D_ARM64EC_WORKAROUND` from the flags as it was only ever needed
in preview versions of VS.

Issue: #21724
2022-01-06 15:31:32 -05:00
Jukka Jalkanen c2777ed008 ASM: Fix identification of armasm 6.17+
Spelling of "ARM Compiler" changed to "Arm Compiler".
2022-01-06 11:55:38 -05:00
Craig Scott f745e0497e CheckCompilerFlags: Catch linker warning about ignored flags
Example warning from arm64 macOS that this will now catch:

ld: warning: -no_pie ignored for arm64

Fixes: #22961
2022-01-03 09:35:16 +11:00
Brad King 7a07d089b9 Merge topic 'cpack-freebsd-pkg'
c3715e08e4 FreeBSD: tidy up
a76f19d5e8 FreeBSD: handle new package-file-suffix
d5ae2f9754 FreeBSD: fix up the package name
0ac1ac798e FreeBSD: migrate to newer pkg_create(3) API

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Semphriss <dev.semphris@gmail.com>
Merge-request: !5854
2021-12-22 08:53:54 -05:00
Brad King 9d80742db4 Merge topic 'FindGLUT-include-dirs'
6fda93faf8 FindGLUT: Provide modern-named GLUT_INCLUDE_DIRS result variable
641b3f4101 FindGLUT: Modernize documentation layout
924b2999a1 FindGLUT: Move mark_as_advanced calls closer to find calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6820
2021-12-21 09:29:20 -05:00
Brad King 132f45a099 Merge topic 'FindBoost-1.78'
d45667d459 FindBoost: Do not warn about now-supported version 1.78

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6819
2021-12-21 09:28:02 -05:00
Brad King a2752fd914 Merge topic 'FindBoost-1.78' into release-3.22
d45667d459 FindBoost: Do not warn about now-supported version 1.78

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6819
2021-12-21 09:28:01 -05:00
Adriaan de Groot d5ae2f9754 FreeBSD: fix up the package name
When using libpkg, the output filename is determined by libpkg
itself, based on information in the manifest: package name and
version, basically. This doesn't necessarily match the name that
CMake has determined via CPACK_TEMPORARY_PACKAGE_FILE_NAME or
CPACK_PACKAGE_FILE_NAME. So reset the CMake-determined list
to match what libpkg will do.
2021-12-21 13:59:27 +01:00
Brad King 6fda93faf8 FindGLUT: Provide modern-named GLUT_INCLUDE_DIRS result variable
Previously this module only provided `GLUT_INCLUDE_DIR`, which does not
follow the modern naming convention documented in `cmake-developer(7)`.

Issue: #23018
2021-12-20 09:53:33 -05:00
Brad King 641b3f4101 FindGLUT: Modernize documentation layout 2021-12-20 09:49:55 -05:00
Brad King 924b2999a1 FindGLUT: Move mark_as_advanced calls closer to find calls 2021-12-20 09:47:41 -05:00
Brad King b2d764fea1 Merge topic 'FindGLUT-include-dirs'
ae6b25d920 FindGLUT: Provide legacy GLUT_INCLUDE_DIR result in pkg-config code path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6814
2021-12-20 09:30:01 -05:00
Brad King e3ece528c8 Merge topic 'googletest-executor-error'
0f51987d42 GoogleTest: show test executor in error message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6813
2021-12-20 09:23:44 -05:00
Brad King 6db5fdae4d Merge topic 'FindGSL-version-regex'
58f2708b90 FindGSL: Improve version extraction regex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6812
2021-12-20 09:22:27 -05:00
Brad King d45667d459 FindBoost: Do not warn about now-supported version 1.78
In commit d176ff71c0 (FindBoost: Add support for Boost 1.78, 2021-12-15)
we forgot to update the future-version check.

Issue: #23016
2021-12-20 09:03:54 -05:00
Brad King ae6b25d920 FindGLUT: Provide legacy GLUT_INCLUDE_DIR result in pkg-config code path
Since commit f90d15458a (FindGLUT: Use pkg-config to find flags if
available, 2021-06-11, v3.22.0-rc1~469^2) we return early if pkg-config
provides the information.  During review of that commit, code to
populate the legacy `GLUT_INCLUDE_DIR` result variable was removed from
that code path.  Add code to provide it.

Also fix the test case to use `GLUT_INCLUDE_DIR`, the result variable
documented officially by the module.

Fixes: #23018
2021-12-17 15:17:29 -05:00
Paul-Antoine Arras 0f51987d42 GoogleTest: show test executor in error message
Fixes: #22920
2021-12-17 16:50:12 +01:00
مهدي شينون (Mehdi Chinoune) 58f2708b90 FindGSL: Improve version extraction regex
Fixes: #23017
2021-12-17 09:32:17 -05:00
Brad King be948f7150 Merge topic 'FindBoost-python-3.10'
d4bb6c0c7f FindBoost: Add support for Python 3.10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6809
2021-12-17 08:54:53 -05:00
Brad King 92ecf5c989 Merge topic 'FindBoost-python-3.10' into release-3.22
d4bb6c0c7f FindBoost: Add support for Python 3.10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6809
2021-12-17 08:54:52 -05:00
Brad King 5cd7a6ac1e Merge topic 'vs-intel-oneapi-toolset' into release-3.22
612c0d49f4 VS: Fix detecting icx.exe with Intel Compiler toolsets newer than 2021

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6806
2021-12-17 08:52:02 -05:00
Brad King 5dfcb318a0 Merge topic 'vs-intel-oneapi-toolset'
612c0d49f4 VS: Fix detecting icx.exe with Intel Compiler toolsets newer than 2021

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6806
2021-12-17 08:52:02 -05:00
Oleg Sidorkin d4bb6c0c7f FindBoost: Add support for Python 3.10
Regexps in FindBoost assumed that python's minor version had only one
digit.  That became not true for 3.10.

Fixes: #23025
2021-12-16 15:15:12 -05:00
Brad King 17c74ec4d7 Merge topic 'FetchContent-doc-typo'
ed9ac756e8 FetchContent: Fix typo in documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6803
2021-12-16 10:40:12 -05:00
Brad King 3071e27c76 Merge topic 'FindBoost-1.78'
d176ff71c0 FindBoost: Add support for Boost 1.78

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6804
2021-12-16 10:25:54 -05:00
William R. Dieter 612c0d49f4 VS: Fix detecting icx.exe with Intel Compiler toolsets newer than 2021
The logic added by commit 7808cbd644 (CMakeDetermineCompilerId: support
Intel DPC++ compiler toolset for VS gen, 2020-12-06, v3.20.0-rc1~330^2)
matches a specific toolset known to be the `icx.exe` compiler, and
assumes all other Intel C++ compilers (that are not DPC++) must be
`icl.exe`.

Since `icx.exe` is officially replacing `icl.exe`, use a regex that
matches the now-fixed set of toolsets known to use `icl.exe`.  Any other
Intel C++ compiler will be assumed to be `icx.exe`.

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-12-15 15:56:20 -05:00
Brad King d176ff71c0 FindBoost: Add support for Boost 1.78
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_78_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.78.0 source tree.

The dependencies differ from those of 1.77:

* The `log` component no longer depends on `date_time`.

Fixes: #23016
2021-12-15 10:22:53 -05:00
Jukka Aho ed9ac756e8 FetchContent: Fix typo in documentation 2021-12-15 16:45:27 +02:00
Brad King 7f6cce63fc Merge topic 'android-system-stl'
38b00f8801 Android: Fix linking android_support for pre-21 system STL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6799
2021-12-14 09:40:17 -05:00
Ryan Prichard 38b00f8801 Android: Fix linking android_support for pre-21 system STL
This typo was introduced in commit 4dca078829 (Android: Link c++abi and
android_support when necessary, 2020-10-29, v3.20.0-rc1~541^2).

Fixes: #23004
2021-12-13 10:43:14 -05:00
Brad King 8595851d58 FindBLAS: Find OpenMP dependency quietly
The `find_package(OpenMP)` calls added/updated by:

* commit f7f3d8987a (FindBLAS: Add dependency of OpenBLAS on OpenMP for
                     BLA_STATIC, 2020-11-10, v3.20.0-rc1~492^2)
* commit 9ef82d95d8 (FindBLAS: Fix detection of OpenMP as dependency of
                     BLA_STATIC, 2021-04-07, v3.20.1~3^2)

were missing the `QUIET` option.

Fixes: #23000
2021-12-10 09:51:42 -05:00
Brad King 2393020b4f Merge topic 'python3.11-support'
43844c5d82 FindPython: Add support for Python 3.11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Marc Chevrier <marc.chevrier@gmail.com>
Merge-request: !6792
2021-12-08 09:53:59 -05:00
Tomáš Hrnčiar 43844c5d82 FindPython: Add support for Python 3.11 2021-12-07 12:41:01 -05:00
Brad King 79afbb2bb3 Merge topic 'lib-arch-no-usr'
d4ba945c48 CMakeParseLibraryArchitecture: Fix parsing /lib/<arch> implicit object path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6790
2021-12-07 09:37:29 -05:00
Brad King 0a46df3c91 Merge topic 'FindOpenSSL-applink'
586d483983 FindOpenSSL: Fix typo in applink condition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6787
2021-12-07 09:33:26 -05:00
Raphael Gozzo d4ba945c48 CMakeParseLibraryArchitecture: Fix parsing /lib/<arch> implicit object path
The current regular expression is able to match `/usr/lib/<arch>`,
`/usr/usr/lib/<arch>`, `/usr/usr/usr/lib/<arch>`, ... but not
`/lib/<arch>`.

This behavior ends up causing the detected architecture to
be x86_64-pc-linux-gnu when the Clang compiler is installed on
a "non-system" location (like /opt/llvm-13) which, in turn, makes
almost every 'find_library()' fail because the correct
architecture is x86_64-linux-gnu.

This is due to a typo in commit 764606e256 (CMakeDetermineCompilerABI:
Extract lib arch from implicit object file paths, 2021-04-05,
v3.20.1~10^2), which used `+` instead of `?`.
2021-12-06 16:47:29 -05:00
Brad King ae48449cf0 FindOpenSSL: Search in lib64 directories on non-Windows platforms
The upstream `openssl` build system may install libraries to `lib64`
even on platforms whose conventions do not use `lib64` for
distro-packaged libraries.

Fixes: #22945
2021-12-06 12:03:08 -05:00
Brad King 586d483983 FindOpenSSL: Fix typo in applink condition
In commit 7b83ca816a (FindOpenSSL: add target OpenSSL::applink to
support OpenSSL's applink feature, 2020-05-12, v3.18.0-rc1~150^2) the
version check was written as "major.major.fix" instead of
"major.minor.fix".
2021-12-06 10:50:25 -05:00