Commit 763aa084b0 (CMP0200: Fix crash in configuration selection policy
warning, 2025-09-10) fixed a bug in the CMP0200 policy warning and also
improved the test to exercise the problematic code, but did not properly
update the expected output. Add the second warning to the expected
output.
Since the `Visual Studio 18 2026` generator is new, we can switch
to the `.slnx` file format without changing behavior for users of
VS 2022 and older.
Fixes: #25887
In commit 5cdd774d51 (VS: Handle build target correct for .NET SDK style
projects with Any CPU, 2022-02-02, v3.23.0-rc1~3^2), some parse results
were stored in temporary copies of `cmSlnProjectEntry` and thrown away.
In commit 5cdd774d51 (VS: Handle build target correct for .NET SDK style
projects with Any CPU, 2022-02-02, v3.23.0-rc1~3^2), some `.sln` parse
results were stored in temporaries and never used by `cmake --build`.
Fixing that locally breaks `--target SomeDotNetSdkProject` in `x64`:
$ cmake --build . --config Debug --target SomeDotNetSdkProject --verbose
".../MSBuild.exe" SomeDotNetSdkProject.csproj ... "/p:Platform=Any CPU"
error MSB8013: This project doesn't contain ... Debug|Win32
Pending further investigation, remove the partial implementation that
amounts to a no-op.
b2ebfd7709 shortobj: properly force long names when computing long names
1980e47192 Tests/IntermediateDirStrategy: test install paths when using SHORT
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11201
f2b2bac85d Emscripten: Detect and identify linker invoked by the compiler driver
7f3f6d1ec6 Emscripten: Allow overriding -sMAIN_MODULE and -sSIDE_MODULE linker flags
526c6ff6d2 Emscripten: Drop -sMAIN_MODULE and -sSIDE_MODULE with emsdk toolchain file
644ad91e6a Emscripten: Restore support for emsdk toolchain file and platform module
9cbeb922dd Emscripten: Enable de-duplication of libraries for CMP0156 with LLD
f22d2904e2 Emscripten: Drop unused placeholder from link rule variables
f4da11a5da Emscripten: Select emcc and em++ compilers by default
28bab611c6 Tests: Add RunCMake.Emscripten case for a shared library
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11204
Place the flag early on executable link lines so that projects can
override it, e.g., with `-sMAIN_MODULE=2` or `-sMAIN_MODULE=0` via
`target_link_options`.
The `-sSIDE_MODULE` flag already appears early enough on shared library
link lines.
Issue: #27232
Emscripten provides a combined toolchain file and platform module that
predates CMake upstream support. It disables support for shared libs.
Fix commit 96d9b94a98 (Emscripten: Add platform modules, 2025-05-16) to
avoid linking with `-sMAIN_MODULE` or `-sSIDE_MODULE` flags, meant to
support shared libraries, when using the emsdk toolchain file.
Fixes: #27232
Emscripten provides a combined toolchain file and platform module that
predates CMake upstream support. Since commit 96d9b94a98 (Emscripten:
Add platform modules, 2025-05-16), our `Platform/Emscripten` module is
included instead, suppressing existing behavior for users that set
`CMAKE_TOOLCHAIN_FILE` to the emsdk-provided toolchain file. Restore
the previous behavior by teaching our module to defer to the original
module in that case.
Issue: #27232
LLD automatically resolves newly encountered symbols using object files
previously encountered. Also, the Emscripten compiler driver invokes
the LLD linker with `--whole-archive ... --no-whole-archive` around all
the libraries. Therefore we should not repeat any.
Issue: #27232
Suggested-by: Marc Chevrier <marc.chevrier@gmail.com>
Update commit 96d9b94a98 (Emscripten: Add platform modules, 2025-05-16)
to account for commit 67639002ad (Ninja,Makefile: Drop now-unused
placeholders from link rule variables, 2025-06-09, v4.1.0-rc1~37^2~1).
The arguments need to be able to force a long name computation so that
install paths can use the intended long paths. Use this computed state
rather than asking the generator for its base state.
Also force long paths for Visual Studio generators when computing it.
Fixes: #27233
Right now, all IDE projects are located at the top level which makes it pretty messy when there are a lot of them.
With this change the generated IDE project will more closely mimic existing folder structure in the project.
This is a full re-write of the CMake Tutorial for CMake 3.23, both
the functionality it provides, as well as the modern workflows that
developers use when interfacing with CMake.
Issue: #22663, #23086, #23799, #26053, #26105, #26153, #26914
The recently introduced CMP0200 warnings could lead to a crash when
encountering targets with empty configuration values. Avoid calling
substr on an empty `string_view`.
Fixes: #27204