Commit Graph

56024 Commits

Author SHA1 Message Date
Brad King e7c300e356 Merge branch 'release-3.22' 2022-01-31 10:31:31 -05:00
Brad King 8035784967 Merge topic 'iar_cmp0057'
cc4da8d13a IAR/CXX: Fix compatibility with CMP0057 OLD

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6921
2022-01-31 10:31:31 -05:00
Brad King 74466016ec Merge topic 'iar_cmp0057' into release-3.22
cc4da8d13a IAR/CXX: Fix compatibility with CMP0057 OLD

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6921
2022-01-31 10:31:30 -05:00
Brad King d3006c0ca7 Merge topic 'shorter-obj'
5f8c5657a9 Shorten object name even if still longer than CMAKE_OBJECT_PATH_MAX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6915
2022-01-31 10:30:30 -05:00
Brad King 3de6155ca0 Merge topic 'update-kwsys'
e83bb75160 Merge branch 'upstream-KWSys' into update-kwsys
d01d634bc7 KWSys 2022-01-29 (389a74dc)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6919
2022-01-31 10:29:38 -05:00
Craig Scott 440bd4845b Merge topic 'doc-rel-path-target_include_directories'
3efa3251e9 Help: Clarify relative path handling for target_include_directories()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6924
2022-01-31 01:05:12 -05:00
Craig Scott 7980ce328d Merge topic 'doc-LINKER_LANGUAGE'
f59d255173 Help: Highlight internal nature of linker preference variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6922
2022-01-31 00:25:05 -05:00
Craig Scott 3efa3251e9 Help: Clarify relative path handling for target_include_directories()
Fixes: #22853
2022-01-31 16:24:07 +11:00
Kitware Robot cacfadd84a CMake Nightly Date Stamp 2022-01-31 00:01:31 -05:00
Craig Scott f59d255173 Help: Highlight internal nature of linker preference variables
In d2efc90598 (Help: Move linker preference variables to the internal
section, 2022-01-15), the internal nature of the
CMAKE_<LANG>_LINKER_PREFERENCE and
CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES variables was
made clearer. The LINKER_LANGUAGE target property references
the former, but doesn't mention that the variable is internal. Make
the internal nature of the variable and the preference implementation
in general clearer in the LINKER_LANGUAGE docs.
2022-01-30 17:09:04 +11:00
Kitware Robot 4b033ca0eb CMake Nightly Date Stamp 2022-01-30 00:01:13 -05:00
Raul Tambre cc4da8d13a IAR/CXX: Fix compatibility with CMP0057 OLD
Commit a9073db7 (IAR: update language specification detection, 2021-09-23)
added usage of the if() IN_LIST operation and forgot to account for it not
being available in CMP0057 OLD mode.
Push and temporarily enable the policy. Also avoid the unnecessary temporary
variable for the list.

Fixes #23147.
2022-01-29 22:55:24 +02:00
Brad King e83bb75160 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2022-01-29 (389a74dc)
2022-01-29 07:06:10 -05:00
KWSys Upstream d01d634bc7 KWSys 2022-01-29 (389a74dc)
Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit 389a74dc7bef2c10d663569bf61c64e25f46b7c7 (master).

Upstream Shortlog
-----------------

Brad King (1):
      259cdb6a SystemTools: Update SetPermissions test case to avoid 0 perms on POSIX

Christopher Chavez (1):
      5a33629f ProcessUNIX.c: fix select(), FD_SETSIZE on macOS
2022-01-29 07:06:10 -05:00
Brad King 55b4e3318d Merge topic 'FindOpenSSL-wince'
b5a21b0d84 FindOpenSSL: Fix ws2 reference on WinCE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6914
2022-01-29 06:51:45 -05:00
Brad King ed8158324b Merge topic 'ibmclang-aix'
07e2eb50f0 IBMClang: Do not use -fvisibility on AIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6917
2022-01-29 06:31:15 -05:00
Brad King 16fbf6ccb6 Merge topic 'gcc12-warning'
ae101921e8 Source: Avoid gcc 12 compilation warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6916
2022-01-29 06:30:19 -05:00
Kitware Robot 4b2ab96c51 CMake Nightly Date Stamp 2022-01-29 00:01:17 -05:00
Brad King 07e2eb50f0 IBMClang: Do not use -fvisibility on AIX
Use of `-fvisibility=hidden` fails:

  unsupported option '-fvisibility=hidden' for target 'powerpc-ibm-aix7.2.0.0'

Apply the change from commit 4feba34d02 (GNU: Do not use -fvisibility on
AIX or HP-UX, 2016-09-03, v3.7.0-rc1~173^2~2) to IBMClang also.

Issue: #23157
2022-01-28 15:43:21 -05:00
leha-bot b5a21b0d84 FindOpenSSL: Fix ws2 reference on WinCE
Fixes: #23070
2022-01-28 11:21:52 -05:00
Nick Little 5f8c5657a9 Shorten object name even if still longer than CMAKE_OBJECT_PATH_MAX
In some cases the shortened path may end up working in practice, even if
it is over CMAKE_OBJECT_PATH_MAX, where the original path does not.
If the original path is too long, do the MD5 substitution whenever it
makes the path shorter.  Retain the warning if it is still too long.
2022-01-28 11:12:59 -05:00
Brad King 6108352f0a Merge topic 'ibmclang-compiler'
8c1731546c Help: Add release note for IBM Open XL C/C++ compiler support
24da80b70a Utilities: Suppress warnings in third-party code with IBMClang
6da99e671c IBMClang: Add support for IBM Open XL C/C++

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6785
2022-01-28 09:50:15 -05:00
Brad King ba069c10dd Merge topic 'cuda_vs_arch_all'
daf372c4d6 CUDA: Fix issuing error if default architecture detection fails
7a0d098352 CUDA: Error on empty/invalid CMAKE_CUDA_ARCHITECTURES set by user
d19273bc7b CUDA: Support all and all-major on Visual Studio
5f667d783a CUDA: Actually use reverse architecture deprecation order for Clang

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !6912
2022-01-28 09:40:50 -05:00
Brad King 4ff6ea0f2f Merge topic 'timestamp-microseconds'
c050d6a01e string(TIMESTAMP): add %f specifier for microseconds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6910
2022-01-28 09:39:03 -05:00
Brad King c2f75492fa Merge branch 'release-3.22' 2022-01-28 09:37:12 -05:00
Brad King b1325f5912 Merge branch 'release-3.21' into release-3.22 2022-01-28 09:37:06 -05:00
Brad King 48af42444f Merge branch 'release-3.21' 2022-01-28 09:37:01 -05:00
Brad King ecaf0369bd Merge branch 'release-3.22' 2022-01-28 09:36:02 -05:00
Brad King 5126b3b8d1 Merge topic 'message-flush'
634587e322 message: Restore explicit flushing of messages on stderr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6913
2022-01-28 09:36:02 -05:00
Brad King 71fa8f5780 Merge topic 'message-flush' into release-3.22
634587e322 message: Restore explicit flushing of messages on stderr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6913
2022-01-28 09:36:01 -05:00
Brad King 0bab5fef9e Merge topic 'bootstrap-aix-powerpc'
98c40dd22e bootstrap: Avoid TOC overflow on AIX powerpc
493d6a66bb bootstrap: Remove stray indentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6911
2022-01-28 09:35:17 -05:00
Brad King ae101921e8 Source: Avoid gcc 12 compilation warning
GCC 12 warns:

    warning: '%04d' directive output may be truncated writing between
    4 and 11 bytes into a region of size 5 [-Wformat-truncation=]

The surrounding logic guarantees the formatted integer will never
be more than 4 bytes, but it doesn't hurt to use a larger buffer.
This GCC behavior is documented:

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104012#c5
2022-01-28 08:06:13 -05:00
Peter Würth c050d6a01e string(TIMESTAMP): add %f specifier for microseconds
The %f specified extends the string(TIMESTAMP) and file(TIMESTAMP)
commands to output the timestamp with a microsecond resolution.
This convention is offered by python's datetime module.
Before, the precision was limited to seconds.

The implementation is done by extending existing cmTimestamp methods
with a `microseconds` parameter. This parameter is optional in order to
be backwards compatible. The timestamps are now received in a
cross-platform manner using libuv, since the standard C functions like
time() don't allow for sub-second precision.

This requires libuv 1.28 or higher.  We already require higher than
that on Windows, so update the required version for other platforms.

Implements: #19335
2022-01-28 06:23:57 -05:00
Kitware Robot ee1bed5058 CMake Nightly Date Stamp 2022-01-28 00:01:22 -05:00
Brad King 9025bde5c3 Merge branch 'message-flush' into release-3.21
Merge-request: !6913
2022-01-27 16:25:41 -05:00
Brad King 634587e322 message: Restore explicit flushing of messages on stderr
In the `cmake` command-line tool, the `message()` command with no
message mode argument prints the message stderr using the C++ `cerr`
stream.  Since commit 0a0a0f8a74 (cmMessenger: Color messages to
terminal by type, 2021-05-18, v3.21.0-rc1~146^2) and an update by
commit c7a8c9c811 (cmMessenger: Revert to non-color messages on
Windows, 2021-07-20, v3.21.1~15^2), we print the newline at the end of
the message using just `\n`.  We've now observed some cases of output
on stdout and stderr getting jumbled when the two go to the same file
descriptor.  Previously the newline was printed with `endl`, which
implicitly flushes.  Flush explicitly to restore that behavior.

Fixes: #23155
2022-01-27 16:06:35 -05:00
Raul Tambre daf372c4d6 CUDA: Fix issuing error if default architecture detection fails
We require CUDA_ARCHITECTURES to be set for targets (see CMP0104). If not set
anything after compiler detection such as ABI detection will fail to generate.
This means we need to error if CMAKE_CUDA_ARCHITECTURES is not set to a valid
value as a result of compiler detection.

Currently we fail to issue the error if compiler detection failed and the ID is
unset. In such a case we won't define detected_architecture making the code
responsible for the error unreachable.

Simplify the detection of architectures used during compiler detection by
always detecting all of them, which enables us to simply the check in the
"default to compiler" path if CMAKE_CUDA_ARCHITECTURES is empty.
As a result we need to move the error checking and CMAKE_CUDA_ARCHITECTURES=OFF
handling fully into the default path thus simplifying the code and unifying the
code paths for NVCC and CUDA.
This also happens to fix:
1. CMAKE_CUDA_ARCHITECTURES=OFF on Clang.
2. A theoretical issue of a compiler defaulting to multiple architectures.

I've additionally added printing of the compiler output along the error to
better reveal possible underlying compiler/system configuration issues.

Fixes #23010.
2022-01-27 22:11:13 +02:00
Raul Tambre 7a0d098352 CUDA: Error on empty/invalid CMAKE_CUDA_ARCHITECTURES set by user
If empty we otherwise treat it the same as unset in most places, but still end
up failing eventually with a confusing "Failed to find a working CUDA
architecture".

This also detects some other basic invalid ones (e.g. "al").
2022-01-27 22:11:13 +02:00
Raul Tambre d19273bc7b CUDA: Support all and all-major on Visual Studio
The Visual Studio integration's CodeGeneration option only knows how to
generate a -gencode flag, which doesn't recognize all. Add a special case to
pass these two as regular additional flags.
2022-01-27 21:43:52 +02:00
Raul Tambre 5f667d783a CUDA: Actually use reverse architecture deprecation order for Clang
The code now matches what the comment describes.
This mistake seems to have been present since the initial introduction in
commit 5df21adf (CUDA: Add support for Clang compiler, 2020-05-07).
2022-01-27 21:43:22 +02:00
Brad King d282ca55b8 Merge topic 'findcuda_quotes'
f590ea506a FindCUDA: Make version extraction robust to empty output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6908
2022-01-27 11:14:08 -05:00
Brad King 93daefc905 Merge topic 'doc_fixes'
1f4c1d1735 Help: Add missing word in CMAKE_CURRENT_{BINARY,SOURCE}_DIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6907
2022-01-27 11:12:45 -05:00
Brad King f4893ac0b1 Merge topic 'enlarge-build-file-stream-buffer'
bbdb000c55 GlobalNinjaGenerator: enlarge file stream buffer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6903
2022-01-27 11:11:59 -05:00
Brad King b41b841cc6 Merge topic 'encode-literal-inplace'
5c3f188bef GlobalNinjaGenerator: Add EncodeLiteralInplace which doesn't copy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6904
2022-01-27 11:11:11 -05:00
Brad King 6a9a0d98e2 Merge topic 'vs-version-enum-class'
a88f98b3be Make cmGlobalVisualStudioGenerator::VSVersion enum class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6902
2022-01-27 11:10:21 -05:00
Brad King 1acf9aec75 Merge topic 'lcc-lexer-warnings'
a8fbe9a2fa LexerParser: Suppress LCC warnings in generated code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6896
2022-01-27 11:08:26 -05:00
Brad King 6f2e478b86 Merge branch 'release-3.22' 2022-01-27 11:07:11 -05:00
Brad King 206a2cc43e Merge branch 'release-3.21' into release-3.22 2022-01-27 11:07:06 -05:00
Brad King dc5db3cacc Merge branch 'release-3.21' 2022-01-27 11:06:53 -05:00
Brad King 0ef94991e9 Merge branch 'release-3.22' 2022-01-27 11:05:04 -05:00