# Cmake preset, configure condition on specific compiler found?

**URL:** https://discourse.cmake.org/t/cmake-preset-configure-condition-on-specific-compiler-found/13541
**Category:** Usage
**Created:** [February 5, 2025, 2:57pm UTC](https://discourse.cmake.org/t/cmake-preset-configure-condition-on-specific-compiler-found/13541 "2025-02-05T14:57:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![MickeJ](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/a5b964/32.png) [@MickeJ](https://discourse.cmake.org/u/MickeJ)
#### Post date: [February 5, 2025, 2:57pm UTC](https://discourse.cmake.org/t/cmake-preset-configure-condition-on-specific-compiler-found/13541/1 "2025-02-05T14:57:12Z")

</div>

Hi,

I have a project that requires g++ compiler but provides additional features if/when using Clang and Oneapi DPC compilers. Because only gcc compiler is required I want to hide clang and oneapi configure alternatives if those compilers are not found when using cmake presets.  
i tried using conditions like below in my cmake configure preset but does not work.

Configure presets with below will always be hidden, can it be done with another syntax?

```auto
  "condition": {
        "type": "equals",
        "lhs": "CMAKE_CXX_COMPILER",
        "rhs": "icpx"
      },

```

```auto
  "condition": {
        "type": "equals",
        "lhs": "CMAKE_CXX_COMPILER",
        "rhs": "clang++"
      },

```
