Skip to content

Commit 2dacb22

Browse files
committed
Acrolinx and content updates
1 parent d7bc5f4 commit 2dacb22

File tree

4 files changed

+18
-16
lines changed

4 files changed

+18
-16
lines changed

docs/build/reference/headername.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,32 @@ The name of a header file that the compiler should compile into a header unit (*
2323

2424
## Remarks
2525

26-
The **`/headerName`** compiler option is available starting in Visual Studio 2019 version 16.10.
26+
The **`/headerName:quote`** and **`/headerName:angle`** compiler options are available starting in Visual Studio 2019 version 16.10.
2727

28-
The **`/headerName`** compiler option, in all its forms, requires the [`/std:c++20`](std-specify-language-standard-version.md) or later compiler option (such as **`/std:c++latest`**).\
29-
If you specify **`/headerName:{quote,angle}`**, you must also specify [`/exportHeader`](module-exportheader.md).
28+
The **`/headerName`** compiler options, in all their forms, require the [`/std:c++20`](std-specify-language-standard-version.md) or later compiler option (such as **`/std:c++latest`**).\
29+
If you specify a **`/headerName`** option, you must also specify [`/exportHeader`](module-exportheader.md).
3030

31-
**`/headerName:quote`** looks up *`header-filename`* using the same rules as `#include "header-name"` and builds it as a header unit (*`.ifc`* file).\
32-
**`/headerName:angle`** looks up *`header-filename`* using the same rules as `#include <header-name>` and builds it as a header unit (*`.ifc`* file).
31+
- **`/headerName:quote`** looks up *`header-filename`* using the same rules as `#include "header-filename"` and builds it as a header unit (*`.ifc`* file).
32+
- **`/headerName:angle`** looks up *`header-filename`* using the same rules as `#include <header-filename>` and builds it as a header unit (*`.ifc`* file).
33+
34+
For more information about the path searching rules for included files in quotes or angle brackets, see [`#include` directive](../../preprocessor/hash-include-directive-c-cpp.md).
3335

3436
### Examples
3537

36-
Given a project that references a header file it defines called `m.h`, the compiler option to compile it into a header unit looks similar to this:
38+
Given a project that references a header file it defines called *`m.h`*, the compiler option to compile it into a header unit looks similar to this example:
3739

38-
```Bash
40+
```bash
3941
cl /std:c++latest /exportHeader /headerName:quote m.h /Fom.h.obj
4042
```
4143

42-
The `/headerName:{quote,angle}` option acts like a flag and doesn't need an argument. The following examples are valid:
44+
The **`/headerName:quote`** and **`/headerName:angle`** options act like a flag and don't need an argument. The following examples are valid:
4345

44-
```Bash
46+
```bash
4547
cl /std:c++latest /exportHeader /headerName:angle /MP /Fo.\ vector iostream algorithm
4648
cl /std:c++latest /exportHeader /headerName:quote /MP /Fo.\ my-utilities.h a/b/my-core.h
4749
```
4850

49-
You can specify multiple `/headerName` options on the same command line, and every argument after that option will be processed with the specified *`header-filename`* lookup rules. The following example processes all the headers as the previous two command line examples in the same way. It looks up the headers using the lookup rules applied as if they had been specified as: `#include <vector>`, `#include "my-utilties.h"`, and `#include "a/b/my-core.h"`:
51+
You can specify multiple **`/headerName`** options on the same command line. Every argument after a **`/headerName`** option is processed with the specified include file lookup rules for quotes or angle brackets until the next **`/headerName`** option. The following example processes all the headers as the previous two command line examples in the same way as before. It looks up the headers using the lookup rules applied as if they had been specified as: `#include <vector>`, `#include <iostream>`, `#include <algorithm>`, `#include "my-utilties.h"`, and `#include "a/b/my-core.h"`:
5052

5153
```bash
5254
cl /std:c++latest /exportHeader /headerName:angle /MP /Fo.\ vector iostream algorithm /headerName:quote my-utilities.h a/b/my-core.h
@@ -55,15 +57,15 @@ cl /std:c++latest /exportHeader /headerName:angle /MP /Fo.\ vector iostream algo
5557
### To set this compiler option in the Visual Studio development environment
5658

5759
> [!NOTE]
58-
> Users don't typically set this command line option. It's set by the build system.
60+
> You normally shouldn't set this option in the Visual Studio development environment. It's set by the build system.
5961
6062
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
6163

6264
1. Set the **Configuration** drop-down to **All Configurations**. Set the **Platform** drop-down to **All Platforms**.
6365

6466
1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page.
6567

66-
1. Modify the **Additional Options** property to add the *`/headerName`* options and arguments. Then, choose **OK** or **Apply** to save your changes.
68+
1. Modify the **Additional Options** property to add the *`/headerName:quote`* or *`/headerName:angle`* options and the header filenames the options apply to. Then, choose **OK** or **Apply** to save your changes.
6769

6870
## See also
6971

docs/build/reference/interface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This switch must be used in with the [`/TP` (Specify source file type)](tc-tp-tc
3434

3535
### To set this compiler option in the Visual Studio development environment
3636

37-
You normally shouldn't set this in the Visual Studio development environment unless you use a different extension for your module interface files. By default, the build system applies this option to files that have a *`.ixx`** extension.
37+
You normally shouldn't set this option in the Visual Studio development environment unless you use a different extension for your module interface files. By default, the build system applies this option to files that have a *`.ixx`** extension.
3838

3939
1. To apply the **`/interface`** option to a file explicitly in the IDE, select the file in **Solution Explorer**. Right-click to open the context menu and select **Properties** to open the Property Pages dialog.
4040

docs/build/reference/internal-partition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ This option can't be used with the [`/interface`](interface.md) compiler option.
5252

5353
### To set this compiler option in the Visual Studio development environment
5454

55-
You normally shouldn't set this in the Visual Studio development environment unless you use a different extension for your partition files. By default, the build system applies this option to files that have a *`.ixx`** extension.
55+
You normally shouldn't set this option in the Visual Studio development environment unless you use a different extension for your partition files. By default, the build system applies this option to files that have a *`.ixx`** extension.
5656

5757
1. To apply the **`/internalPartition`** option to a file explicitly in the IDE, select the file in **Solution Explorer**. Right-click to open the context menu and select **Properties** to open the Property Pages dialog.
5858

docs/build/reference/module-exportheader.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ cl . . . /std:c++latest /exportHeader /headerName:quote util/util.h
5353

5454
### To set this compiler option in the Visual Studio development environment
5555

56-
You normally shouldn't set this in the Visual Studio development environment. It is set by the build system.
56+
You normally shouldn't set this option in the Visual Studio development environment unless you use a different extension for your header files. By default, the build system applies this option to compiled files that have a *`.h`* extension, or no extension.
5757

5858
1. To apply the **`/exportHeader`** option to a file explicitly in the IDE, select the file in **Solution Explorer**. Right-click to open the context menu and select **Properties** to open the Property Pages dialog.
5959

@@ -65,7 +65,7 @@ You normally shouldn't set this in the Visual Studio development environment. It
6565

6666
## See also
6767

68-
[`/headerName (Build a header unit from the specified header)`](headername.md)\
68+
[`/headerName` (Build a header unit from the specified header)](headername.md)\
6969
[`/headerUnit` (Use header unit IFC)](headerunit.md)\
7070
[`/reference` (Use named module IFC)](module-reference.md)\
7171
[`/translateInclude` (Translate include directives into import directives)](translateinclude.md)

0 commit comments

Comments
 (0)