mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
pchreuse: remove MSVC 2008-or-older condition
Testing locally, `.idb` files are *not* made unconditionally with v71 at least. Perhaps v90 is an outlier? In any case, the typo introduced in1f791eb160(Multi-Ninja: Fix reusable PCHs for MSVC, 2020-05-24) via !4787 (see `cmLocalGenerator.cxx:2751` for extra space inside the quotes) was preserved when fixing `IS_NEWER_THAN` logic in28501fca94(PCH PDB: Fix misuse of IS_NEWER_THAN in timestamp check, 2021-02-21) from !5825. The typo itself was fixed incb46c4a918(cmLocalGenerator: fix quoting in generated script, 2025-06-16) via !10887 but the condition was fumbled later in that MR's commitf78f592b78(pchreuse: defer target existence enforcement to generation time, 2025-06-16) in constructing `to_file` for the script. In the end, these typos ended up making the builds pass. In fixing it properly in the parent commit, it exposed MSVC v71 as an outlier in passing the tests again. Since I do not see `.idb` files with the toolchain as tested in CI, further investigation into the build that caused the condition to be added in the first place is required. In the meantime, removing this check makes things happy as far as CMake's own test suite is concerned.
This commit is contained in:
@@ -2837,18 +2837,7 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
|
||||
langFlags.find("-Zi") != std::string::npos;
|
||||
}
|
||||
|
||||
// MSVC 2008 is producing both .pdb and .idb files with /Zi.
|
||||
bool msvc2008OrLess =
|
||||
cmSystemTools::VersionCompare(cmSystemTools::OP_LESS,
|
||||
compilerVersion, "16.0") &&
|
||||
compilerId == "MSVC";
|
||||
// but not when used via toolset -Tv90
|
||||
if (this->Makefile->GetSafeDefinition(
|
||||
"CMAKE_VS_PLATFORM_TOOLSET") == "v90") {
|
||||
msvc2008OrLess = false;
|
||||
}
|
||||
|
||||
if (editAndContinueDebugInfo || msvc2008OrLess) {
|
||||
if (editAndContinueDebugInfo) {
|
||||
this->CopyPchCompilePdb(config, lang, target, reuseTarget,
|
||||
{ ".pdb", ".idb" });
|
||||
} else if (programDatabaseDebugInfo) {
|
||||
|
||||
Reference in New Issue
Block a user