# How to create a dummy build preset

**URL:** <https://discourse.cmake.org/t/how-to-create-a-dummy-build-preset/8398>\
**Category:** Code\
**Created:** [June 23, 2023, 2:46pm UTC](https://discourse.cmake.org/t/how-to-create-a-dummy-build-preset/8398 "2023-06-23T14:46:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phread](https://discourse.cmake.org/user_avatar/discourse.cmake.org/phread/32/2285_2.png) [@phread](https://discourse.cmake.org/u/phread)\
**Post date:** [June 23, 2023, 2:46pm UTC](https://discourse.cmake.org/t/how-to-create-a-dummy-build-preset/8398/1 "2023-06-23T14:46:18Z")

</div>

I am generating a number of CMakePresets.json files.  
It would be convenient to be able to generate a no-op build preset.  
(Rather than discovering that it will not be needed and dealing with the fall-out).

note: In the following examples these are fragments included from a driver CMakePresets.json

The problem is that the obvious options:

```json
{
  "version": 6,
  "buildPresets": [
    {
      "name": "cb-G-iface-algorithm",
      "configurePreset": "cc-ninja",
      "configuration": "Debug",
      "inheritConfigureEnvironment": false,
      "targets": []
    }
  ]
}

```

```json
{
  "version": 6,
  "buildPresets": [
    {
      "name": "cb-G-iface-algorithm",
      "configurePreset": "cc-ninja",
      "configuration": "Debug",
      "inheritConfigureEnvironment": false
    }
  ]
}

```

Seem to build all targets.

I could make a do nothing target…

```json
{
  "version": 6,
  "buildPresets": [
    {
      "name": "cb-G-iface-algorithm",
      "configurePreset": "cc-ninja",
      "configuration": "Debug",
      "inheritConfigureEnvironment": false,
      "targets": [ "NULL"
      ]
    }
  ]
}

```

…or is there some canonical way?

I believe there is an ALL target? is there a NULL or NONE target?

---

<div class="post-metadata">

**Author:** ![phread](https://discourse.cmake.org/user_avatar/discourse.cmake.org/phread/32/2285_2.png) [@phread](https://discourse.cmake.org/u/phread)\
**Post date:** [June 23, 2023, 8:19pm UTC](https://discourse.cmake.org/t/how-to-create-a-dummy-build-preset/8398/2 "2023-06-23T20:19:40Z")

</div>

I added the following to my CMakeLists.txt file.

```cmake
add_custom_target( NONE )

```

This seems to make the following work the way I want.

```json
{
  "version": 6,
  "buildPresets": [
    {
      "name": "cb-G-iface-algorithm",
      "configurePreset": "cc-ninja",
      "configuration": "Debug",
      "inheritConfigureEnvironment": false,
      "targets": ["NONE"]
    }
  ]
}
```
