microsoft / microsoft/WindowsAppSDK-Samples
"Samples\Content\cpp-win32\Squares\Squares.vcxproj" doesn't configure precompiled headers correctly
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1k
- Forks
- 335
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 8
Description
"Samples\Content\cpp-win32\Squares\Squares.vcxproj" doesn't configure precompiled headers correctly, meaning that:
- 'pch.cpp' is compiled unnecessarily
- Other '.cpp' files don't benefit from precompiled headers.
Only the Debug|Win32 configuration actually specifies any precompiled header settings, and they appear to be wrong - it sets the PrecompiledHeader metadata to Create for all ClCompile items, it should be set to Use by default and Create for pch.cpp.
Without precompiled headers (i.e. as the project is currently defined) the build takes ~26 seconds on my machine. Opt-ing in to precompiled headers takes it to ~11 seconds for a full build, and incremental builds would also benefit.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open Samples\Content\cpp-win32\Squares\Squares.vcxproj and inspect its Debug|Win32 ClCompile precompiled-header settings, along with pch.cpp and the other .cpp items. Correct the default metadata so pch.cpp creates the precompiled header and other sources use it, then verify that the project builds and that full-build time improves from the reported configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100