61e76200d7 Help: Discourage use of Swift_MODULE_DIRECTORY with multi-config generators
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9547
b2081e3810 Merge branch 'backport-kwsys-ConsoleBuf-windows-terminal' into update-kwsys
98dd754b62 KWSys: ConsoleBuf: Fix test case when running under Windows Terminal
a151fdda01 Merge branch 'upstream-KWSys' into update-kwsys
c6ef3299d0 KWSys 2024-05-28 (0d6eac1f)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9553
Our test case writes a NUL byte to the console to test its behavior.
The behavior of Windows Terminal differs from Windows Console Host
(conhost.exe). Detect which of these is in use at runtime and adjust
our expected result accordingly.
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit 0d6eac1feb8615fe59e8f972d41d1eaa8bc9baf8 (master).
Upstream Shortlog
-----------------
Brad King (1):
beaf1ca1 ConsoleBuf: Fix test case when running under Windows Terminal
Previously, FetchContent was relying on the policies of the
includer being compatible with the module. That made the
module vulnerable to subtle problems where policy settings
might lead to unexpected behavior.
With this change, we now specify the policies for as much of
the module as we can without breaking backward compatibility.
Only a few specific implementation details of the
FetchContent_MakeAvailable() macro have to remain uncontrolled
due to the way those parts can invoke user or project code which
may be relying on the includer's policy settings (intentionally or not).
Place `.swiftmodule` files a subdirectory named after the configuration.
Fixes: #25864Fixes: #25997
- Swift/RunCMakeTest.cmake:
- CMP0157-OLD was enabled for Xcode, where it works.
- A test was added that verifies .swiftmodule's are generated into
separate directories with multi-config generators.
- Tests/SwiftOnly/CMakeLists.txt: tests were added that validate that
cross-subdirectory module dependencies (via target_link_libraries)
work.
Also factor out testing that's common across Xcode and Ninja.* generators.
- Ninja expected output files were extended to accept directories named
after the configuration in paths.
- Tests that previously ran with Ninja were allowed to run with Ninja
Multi-Config.
- Swift/RunCMakeTest.cmake:
- Checks for conditions where little or no testing could be done
were moved to the top of the file, with return()s to limit nesting
of the remainder of the code ("Early bailouts").
- CMP0157 tests, which were being performed for all generators, were
factored out into a block at the top of the file.
- RunCMake_TEST_OPTIONS is set initially for all multi-config
generators and list(APPEND)'ed-to in each block() where it was previously
set() and unset().
0dbf2c24bf Tests/RunCMake: Document how to write multi-step test cases
61a08b0856 Tests/RunCMake: Document commands/variables available to RunCMakeTest scripts
aebf6b8b29 Tests/RunCMake: Clarify documentation of platform-specific output matching
c2f8a6729f Tests/RunCMake: Rename "sub-test" terminology to "case"
0add7a802f Tests/RunCMake: Organize README as multiple sections
aff4dc47c4 Tests/RunCMake: Cross-reference README from main Tests/README
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9548
af81b8667e GenEx: Add generator expr. for CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT
8a11a39c51 Help: Use correct programming language names in docs of generator expr.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9538