You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message(STATUS "CMake injected before the target")
@@ -263,6 +281,51 @@ CXX_STANDARD_REQUIRED = true
263
281
FOLDER = "MyFolder"
264
282
```
265
283
284
+
### Custom commands
285
+
286
+
Use `[[target.<name>.custom-command]]` to map directly to [`add_custom_command`](https://cmake.org/cmake/help/latest/command/add_custom_command.html). A custom command can use either the `OUTPUT` form or the `TARGET` form:
For each custom command entry, exactly one of `outputs` or `build-event` is required.
328
+
266
329
A table mapping the cmkr features to the relevant CMake construct and the relevant documentation pages:
267
330
268
331
| cmkr | CMake construct | Description |
@@ -279,6 +342,9 @@ A table mapping the cmkr features to the relevant CMake construct and the releva
279
342
|`link-libraries`|[`target_link_libraries`](https://cmake.org/cmake/help/latest/command/target_link_libraries.html)| Adds library dependencies. Use `::mylib` to make sure a target exists. |
|`type = "custom"` + custom target keys |[`add_custom_target`](https://cmake.org/cmake/help/latest/command/add_custom_target.html)| Creates a custom target with command/dependency options. |
347
+
|`[[target.<name>.custom-command]]`|[`add_custom_command`](https://cmake.org/cmake/help/latest/command/add_custom_command.html)| Supports both `OUTPUT` and `TARGET` forms. |
282
348
|`properties`|[`set_target_properties`](https://cmake.org/cmake/help/latest/command/set_target_properties.html)| See [properties on targets](https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html#properties-on-targets) for more information. |
<sup><sub>This page was automatically generated from [tests/custom-command/cmake.toml](https://github.com/build-cpp/cmkr/tree/main/tests/custom-command/cmake.toml).</sub></sup>
0 commit comments