Skip to content

Commit 47aaeaf

Browse files
committed
Document the supported languages
1 parent 08204d9 commit 47aaeaf

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/cmake-toml.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,32 @@ include-before = ["cmake/before-project.cmake"]
3939
include-after = ["cmake/after-project.cmake"]
4040
```
4141

42+
### Languages
43+
44+
Supported languages are (see [`enable_language`](https://cmake.org/cmake/help/latest/command/enable_language.html) for more information):
45+
46+
- `C`
47+
- `CXX` → C++
48+
- `CSharp` → C#
49+
- `CUDA`
50+
- `OBJC` → Objective-C
51+
- `OBJCXX` → Objective-C++
52+
- `Fortran`
53+
- `HIP`
54+
- `ISPC`
55+
- `Swift`
56+
- `ASM`
57+
- `ASM_MASM`[Microsoft Macro Assembler (MASM)](https://learn.microsoft.com/en-US/cpp/assembler/masm/masm-for-x64-ml64-exe)
58+
- `ASM_NASM`[Netwide Assembler (NASM)](https://www.nasm.us)
59+
- `ASM_MARMASM` [Microsoft ARM Assembler](https://learn.microsoft.com/en-us/cpp/assembler/arm/arm-assembler-command-line-reference)
60+
- `ASM-ATT`
61+
- `Java` (undocumented)
62+
- `RC` (undocumented)
63+
64+
After a language is enabled, adding sources files with the corresponding extension to your target will automatically use the appropriate compiler/assembler for it.
65+
66+
_Note_: It is generally discouraged to disable the `C` language, unless you are absolutely sure it is not used. Sometimes projects added with `fetch-content` implicitly require it and the error messages can be extremely confusing.
67+
4268
## Conditions
4369

4470
You can specify your own conditions and use them in any `condition` field:

0 commit comments

Comments
 (0)