Skip to content

Add header-units.json - #1545

Merged
Stephan T. Lavavej (StephanTLavavej) merged 5 commits into
microsoft:masterfrom
StephanTLavavej:header_units_json
Jan 15, 2021
Merged

Add header-units.json#1545
Stephan T. Lavavej (StephanTLavavej) merged 5 commits into
microsoft:masterfrom
StephanTLavavej:header_units_json

Conversation

@StephanTLavavej

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) commented Dec 19, 2020

Copy link
Copy Markdown
Member

Works towards #60.

This adds header-units.json, a file that will tell the compiler which headers are eligible to be automatically treated as header units at the user's request. (That is, there will be a compiler option allowing #include <vector> to be treated as import <vector>; without changing the source code.)

Changing .vscode/settings.json is necessary because otherwise the "**/stl/inc/**" entry causes this file to be displayed as C++.

Remaining tasks:

  • Name the file header-units.json with a hyphen.
  • Confirm that JSON With Comments is acceptable.
  • Confirm that this syntax is correct.
  • Update stl/CMakeLists.txt to copy this to the output directory.
    • Verified for x86 and x64 that this copies to out\build\ARCH\out\inc\header-units.json.
  • Update internal MSBuild machinery to copy this to the output directory.
    • Updated src/vctools/crt/copy_crt/copy_crt.nativeproj.
  • Update internal setup authoring.
    • Updated src/SetupPackages/swix/VisualCpp/crt.headers/files.swr.
  • Confirm that internal src\vctools\crt\lkgsync\lkgsync.xml should ignore this.
  • Update the wiki's Files To Edit When Adding Or Removing Files.

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added cxx20 C++20 feature enhancement Something can be improved and removed cxx20 C++20 feature labels Dec 19, 2020
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) changed the title Add header_units.json Add header-units.json Jan 6, 2021
@cdacamar

Copy link
Copy Markdown
Contributor

As per the design doc agreed upon between the FE, project system, and Libs, the syntax is indeed correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants