Commit Graph

64721 Commits

Author SHA1 Message Date
Craig Scott
54cb65b197 ExternalProject: Prevent URL list-splitting on special characters
If a URL contains special characters like parentheses and a few others,
they would previously have caused a foreach() call that iterates over the
URLs to parse those special characters as separate, unquoted arguments.
They would then have effectively split the list of URLs at unexpected places.
Prepare the arguments for the foreach() call by using use bracket syntax
to robustly handle any URLs that do have unescaped special characters.

Issue: #25148
2024-01-28 09:24:37 +11:00
Craig Scott
aab6be9aad ExternalProject: Catch empty REMOTE or LOCAL earlier
If we are given an empty string for URL, or we have a logic error that leads
to the file we download to being an empty string, we will now catch this at
CMake configure time instead of whenever the download is attempted at
build time.
2024-01-27 11:44:01 +11:00
Craig Scott
e72791ecf6 ExternalProject: Update foreach() calls to use IN LISTS and IN ITEMS 2024-01-27 11:07:36 +11:00
Craig Scott
873b2ad2eb ExternalProject: Remove N^2 add_dependencies() calls
ExternalProject_Add_StepDependencies() contained a foreach() loop that
had another foreach() loop inside it iterating over the same set of values
(the dependencies). This resulted in add_dependencies() calls that added
the same dependencies to the step target N^2 times. A single call to
add_dependencies() with the list of dependencies provides the necessary
relationships without the N^2 behavior, and it removes the inner foreach()
loop.
2024-01-27 11:06:38 +11:00
Brad King
b7c11ded92 Merge topic 'stdio-streams-always'
96010cc968 Ensure stdin, stdout, stderr FILE streams are open on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9189
2024-01-26 10:15:47 -05:00
Brad King
d9b9f63083 Merge topic 'ctest-tests-from-file'
701029726f ctest_test: add options INCLUDE_FROM_FILE and EXCLUDE_FROM_FILE
dbacc1d5a8 ctest: add command line option to exclude tests listed in a given file
022f20f663 ctest: add command line option to run the tests listed in a given file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9128
2024-01-26 10:14:58 -05:00
Brad King
409ab01039 Merge topic 'simplify-emacs-cmake-mode'
91336c7469 cmake-mode.el: Simplify jumping to begin/end of functions/macros

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9185
2024-01-26 10:13:42 -05:00
Brad King
37a7eed154 Merge branch 'release-3.28' 2024-01-26 10:12:13 -05:00
Brad King
5351a2b170 Merge topic 'revert-FindFreetype-use-config'
b5725ae619 FindFreetype: Revert use of upstream freetype cmake package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9187
2024-01-26 10:12:12 -05:00
Brad King
6c3ab39109 Merge topic 'revert-FindFreetype-use-config' into release-3.28
b5725ae619 FindFreetype: Revert use of upstream freetype cmake package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9187
2024-01-26 10:12:11 -05:00
Brad King
ffb682b853 Merge branch 'release-3.28' 2024-01-26 10:11:09 -05:00
Brad King
8e7960773f Merge topic 'find-matlab-docs-mcr-version-mapping'
29fece7ef3 FindMatlab: Document that version mappings do not apply to MCR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9184
2024-01-26 10:11:09 -05:00
Brad King
f6c9da9154 Merge topic 'find-matlab-docs-mcr-version-mapping' into release-3.28
29fece7ef3 FindMatlab: Document that version mappings do not apply to MCR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9184
2024-01-26 10:11:08 -05:00
Brad King
debb57efa2 Merge branch 'release-3.28' 2024-01-26 10:10:02 -05:00
Brad King
ebef793519 Merge topic 'find-matlab-fix-nonzero-patch-version'
b1e27b1b9d FindMatlab: Some versions use major.minor.patch in the registry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9183
2024-01-26 10:10:02 -05:00
Brad King
0e39f3446e Merge topic 'find-matlab-fix-nonzero-patch-version' into release-3.28
b1e27b1b9d FindMatlab: Some versions use major.minor.patch in the registry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9183
2024-01-26 10:10:01 -05:00
Kitware Robot
60f9b0fd99 CMake Nightly Date Stamp 2024-01-26 00:01:10 -05:00
Brad King
0bce22e71e Merge topic 'tests-c99' into release-3.28
a10d2ad397 Tests: Improve C compatibility of LoadCommand tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9186
2024-01-25 14:59:26 -05:00
Brad King
669a3289ba Merge branch 'release-3.28' into master 2024-01-25 14:59:26 -05:00
Brad King
b5725ae619 FindFreetype: Revert use of upstream freetype cmake package
The upstream freetype cmake package uses generator expressions and
imported target to express its dependencies.  That's fine on its own.
However, our use of it since commit d83d925045 (FindFreetype: use
`freetype-config.cmake` if available, 2023-09-06, v3.28.0-rc1~130^2)
causes the `FREETYPE_LIBRARIES` result variable to reference those
imported targets and create a package-level dependency for clients that
did not exist previously.  Revert that change for now, along with its
follow-up fixes.  Further investigation will be needed to solve the
motivating use case another way.

Fixes: #25635
2024-01-25 14:45:49 -05:00
Florian Weimer
a10d2ad397 Tests: Improve C compatibility of LoadCommand tests
The previous code used `char **` and `const char **`` types as if they
were the same.  But they are distinct types in C, so when passing
these pointers as function arguments, their types have to match.
Future C compilers will treat this as an error, similar to what
C++ compilers do today.
2024-01-25 14:35:01 -05:00
Brad King
96010cc968 Ensure stdin, stdout, stderr FILE streams are open on Windows
Extend commit c85524a94a (Ensure stdin, stdout, and stderr pipes are always
open, 2019-05-02, v3.15.0-rc1~171^2) to cover the `stdin`, `stdout`, and
`stderr` FILE streams from `<stdio.h>`.

Issue: #25625
2024-01-25 12:42:12 -05:00
Alex Neundorf
701029726f ctest_test: add options INCLUDE_FROM_FILE and EXCLUDE_FROM_FILE
These options can be used to specify files which can be used
to restrict the set of tests that will be executed.

Fixes: #25455
2024-01-25 12:38:04 -05:00
Alex Neundorf
dbacc1d5a8 ctest: add command line option to exclude tests listed in a given file
Add `--exclude-from-file <filename>` to exclude the tests listed in the
given file.

Issue: #25455
2024-01-25 12:37:56 -05:00
Alex Neundorf
022f20f663 ctest: add command line option to run the tests listed in a given file
Add `--tests-from-file <filename>` to run only the tests listed in the
given file.  The test names must match exactly, no regexps or something.
The listed tests can still be filtered with a regexp using -R.

Issue: #25455
2024-01-25 12:37:16 -05:00
Joerg Bornemann
91336c7469 cmake-mode.el: Simplify jumping to begin/end of functions/macros
This change was spawned by the desire to use `narrow-to-defun` in CMake
files. However, there was no "CMake version" of that function, and it
turns out that we don't need one if we make `beginning-of-defun` and
`end-of-defun` work in `cmake-mode`.

In the setup code of `cmake-mode` we now set the local variables
`beginning-of-defun-function` and `end-of-defun-function`. This makes
`beginning-of-defun` and `end-of-defun` work as expected.

Functions that use this facility also work now: `mark-defun` and
`narrow-to-defun` and possibly others.

We remove `cmake-mark-defun` since it's superfluous now.

We remove the defun-related key bindings since the standard functions
that are bound globally work fine with this patch.
2024-01-25 11:51:17 -05:00
Brad King
8533a8505c Merge branch 'release-3.28' 2024-01-25 10:56:36 -05:00
Brad King
2cdf47ee41 Merge topic 'revert-replace-cmsysprocess-with-cmuvprocesschain' with -s ours
Use the `-s ours` merge strategy to avoid actually reverting the
original changes inpost-3.28 development.

bcbb212df7 Revert use of libuv for process execution for 3.28

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9176
2024-01-25 10:56:25 -05:00
Brad King
151601c2e3 Merge topic 'revert-replace-cmsysprocess-with-cmuvprocesschain' into release-3.28
bcbb212df7 Revert use of libuv for process execution for 3.28

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9176
2024-01-25 10:53:04 -05:00
Brad King
3ff29f9f5e Merge branch 'release-3.28' 2024-01-25 10:40:02 -05:00
Brad King
b11c8c45f9 Merge topic 'cmuvprocesschain'
adb3e13d32 cmUVProcessChain: Tolerate fileno() of invalid FILE stream
b6e4e4babc cmUVProcessChain: Simplify SetExternalStream usage
116bb2b70f cmUVProcessChain: Simplify builder initialization
d32c30906a Tests: Add missing include in testUVProcessChainHelper on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9181
2024-01-25 10:40:02 -05:00
Brad King
23747f7056 Merge topic 'cmuvprocesschain' into release-3.28
adb3e13d32 cmUVProcessChain: Tolerate fileno() of invalid FILE stream
b6e4e4babc cmUVProcessChain: Simplify SetExternalStream usage
116bb2b70f cmUVProcessChain: Simplify builder initialization
d32c30906a Tests: Add missing include in testUVProcessChainHelper on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9181
2024-01-25 10:40:00 -05:00
Brad King
4c4cd1246e Merge topic 'cpack-wix-msi-status'
3ed275bbb6 CPack/WiX: Fix installer status text

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9182
2024-01-25 10:33:12 -05:00
Brad King
c923b8a3e2 Merge topic 'IntelLLVM-isystem-flag'
8218aed118 IntelLLVM: support marking include paths as SYSTEM directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8722
2024-01-25 10:16:54 -05:00
Brad King
35246ed9c4 Merge topic 'swift-windows'
b2129a14f4 Tests: Fix SwiftMix tests' runtime library selection on Windows
4f49f7fc0b Tests: Fix SwiftOnly test on Windows
2dec0c0308 Tests: Fix RunCMake.Swift expected output on Windows
79f1f509b1 Tests: Fix RunCMake.Swift's build output checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jeremy Day <jadaytime@gmail.com>
Merge-request: !9169
2024-01-25 10:15:28 -05:00
Hermann von Kleist
29fece7ef3 FindMatlab: Document that version mappings do not apply to MCR 2024-01-25 09:00:18 +01:00
Hermann von Kleist
b1e27b1b9d FindMatlab: Some versions use major.minor.patch in the registry
Fixes #25631.
2024-01-25 08:54:01 +01:00
Kitware Robot
a8f0e34790 CMake Nightly Date Stamp 2024-01-25 00:01:07 -05:00
Brad King
bcbb212df7 Revert use of libuv for process execution for 3.28
Wide use of CMake 3.28.{1,0[-rcN]} has uncovered some hangs and crashes
in libuv SIGCHLD handling on some platforms, particularly in virtualization
environments on macOS hosts.  Although the bug does not seem to be in CMake,
we can restore stability in the CMake 3.28 release series for users of such
platforms by reverting our new uses of libuv for process execution.

Revert implementation changes merged by commit 4771544386 (Merge topic
'replace-cmsysprocess-with-cmuvprocesschain', 2023-09-06, v3.28.0-rc1~138),
but keep test suite updates.

Issue: #25414, #25500, #25562, #25589
2024-01-24 17:10:00 -05:00
Brad King
adb3e13d32 cmUVProcessChain: Tolerate fileno() of invalid FILE stream
On Windows, in a GUI process without a console, the `std{in,out,err}`
standard FILE streams may not be open.  Avoid passing an invalid file
descriptor to the child process, and let libuv attach NUL instead.

Fixes: #25625
2024-01-24 16:59:49 -05:00
Brad King
b6e4e4babc cmUVProcessChain: Simplify SetExternalStream usage
It is commonly called with the `fileno()` of a `FILE*` stream,
so accept the latter directly.
2024-01-24 16:59:49 -05:00
Brad King
116bb2b70f cmUVProcessChain: Simplify builder initialization 2024-01-24 16:59:49 -05:00
Brad King
d32c30906a Tests: Add missing include in testUVProcessChainHelper on Windows
We use `STATUS_ACCESS_VIOLATION` from `windows.h`.
2024-01-24 16:59:23 -05:00
Brad King
3ed275bbb6 CPack/WiX: Fix installer status text
Previously, installers displayed extra text on some Windows versions:

    File: [1], Directory: [9], Size [6]

Add an option to our WiX templates to suppress that.

Fixes: #25634
2024-01-24 15:28:13 -05:00
Brad King
b2129a14f4 Tests: Fix SwiftMix tests' runtime library selection on Windows
Swift on Windows provides only a release runtime.
Use it for C and CXX too, in all configurations, to match.

Issue: #25573
Suggested-by: Saleem Abdulrasool <compnerd@compnerd.org>
2024-01-24 14:44:40 -05:00
Evan Wilde
4f49f7fc0b Tests: Fix SwiftOnly test on Windows
Add public symbols to SubA and SubB.  The test was broken due to a
broken build graph.  The build graph expects libraries to emit the
`.lib` file.  `link.exe` only emits the implib if the library exports at
least one symbol. Because these two libraries were empty, nothing was
generated.

Fixing by adding a public symbol to both libraries.

Issue: #25573
2024-01-24 14:43:21 -05:00
Evan Wilde
2dec0c0308 Tests: Fix RunCMake.Swift expected output on Windows
Artifact file extensions differ.

Issue: #25573
2024-01-24 14:42:52 -05:00
Brad King
79f1f509b1 Tests: Fix RunCMake.Swift's build output checks 2024-01-24 14:41:35 -05:00
Ben Boeckel
8218aed118 IntelLLVM: support marking include paths as SYSTEM directories
Also learn how to suppress warnings when possible.

See: https://discourse.cmake.org/t/icx-on-windows-supports-external-i/8739
2024-01-24 14:21:05 -05:00
Brad King
ad50700038 Merge topic 'cpack-rpm-threads'
453742ae88 CPack/RPM: Enable rpm threads during package generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9178
2024-01-24 08:39:54 -05:00