Hi I acknowledge your efforts, and looking into it more closely, it does not seem linked to duplicated names (not directly). It is the workaround provided by MS (adding
<Project>
<PropertyGroup>
<UseMultiToolTask>true</UseMultiToolTask>
<EnforceProcessCountAcrossBuilds>true</EnforceProcessCountAcrossBuilds>
<EnableClServerMode>true</EnableClServerMode>
<CL_MPCount>20</CL_MPCount>
</PropertyGroup>
</Project>
to vsprops) that causes havoc in compilation. So I'm either stuck to new behaviour and slow compile times (it makes sense to have many same names in my project) or old behaviour, or using folder mode and ninja (folder mode is much less pleasant than a well organized project with source_group and so on).
Thanks, I'll carry my complaints to people at VS team.
A project with same source file names (in different directories) fails to build. Linker protests against missing files.
With cmake_policy(SET CMP0147 OLD)
the project compiles fine (as in cmake < 3.27)
Remark: having parallel compiles when multiple file have the same short name is a problem with VS and needs some vsprops to be applied (see here text ). However make or ninja have no problem with it whatsoever.
A project with same source file names (in different directories) fails to build. Linker protests against missing files.
With cmake_policy(SET CMP0147 OLD)
the project compiles fine (as in cmake < 3.27)
Remark: having parallel compiles when multiple file have the same short name is a problem with VS and needs some vsprops to be applied (see here text ). However make or ninja have no problem with it whatsoever.
This breaks the use of precompiled headers, so turn this option off is needed.
Here's what happens
Scanning sources for module dependencies...
std.ixx
std.compat.ixx
Compiling...
cmake_pch.cxx
std.ixx
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(544,5): error MSB6006: "CL.exe" exited with code 2.
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\modules\std.ixx(147,1): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "[...]/Debug/cmake_pch.hxx"' to your source?