Skip to content

VS: Restore toleration of target-wide -TP flag with MSVC

Brad King requested to merge brad.king/cmake:vs-lang-flags into master

Since !4761 (merged) we only add a per-source language selection flag when the source file extension does not match the compiler's default. This approach breaks when a project adds a target-wide -TP flag.

Although such projects likely did not work with non-VS generators, we did support them before in Visual Studio generators. Add a special case to tolerate such flags again.

Fixes: #21005 (closed)
Backport: release:HEAD^2

Edited by Brad King

Merge request reports