# Disabling present for Linux-arm64 on Linux-arm64 target machine.

**URL:** https://discourse.cmake.org/t/disabling-present-for-linux-arm64-on-linux-arm64-target-machine/8058
**Category:** Usage
**Tags:** os:windows
**Created:** [May 5, 2023, 7:23am UTC](https://discourse.cmake.org/t/disabling-present-for-linux-arm64-on-linux-arm64-target-machine/8058 "2023-05-05T07:23:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![siddmohsin](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@siddmohsin](https://discourse.cmake.org/u/siddmohsin)
#### Post date: [May 5, 2023, 7:23am UTC](https://discourse.cmake.org/t/disabling-present-for-linux-arm64-on-linux-arm64-target-machine/8058/1 "2023-05-05T07:23:45Z")

</div>

Hello All,

I am trying to disable Linux-arm64 preset (defined in our CMakePresets.json) on linux x64 machine. To do that we tried below

```auto
        {
            "name": "Linux-arm64",
            "inherits": [
                "PRESETOS:Linux-ARCH:arm64",
                "PRESETKERNEL:Linux-ARCH:arm64",
                "OSLinux",
                "ARCHarm64",
                "Default"
            ],
            "vendor": {
                "microsoft.com/VisualStudioSettings/CMake/1.0": {
                    "hostOS": "Linux"
                },
           },
            "condition": {
                "type": "equals",
                "lhs": "${CMAKE_SYSTEM_PROCESSOR}",
                "rhs": "x86_64"

            }
        },

```

This works fine when I select generate cmake cache generation on Linux machine. It hides Linux-arm64 presets which is what we want.

Since my this CMakePresets.json also have presets (Windowx-x64, Windows-arm64,etc) on my windows builds. When I run below command on command line it gives me below error

D:\TW\Workspace\>cmake --preset Windows-x64  
CMake Error: Could not read presets from D:/TW/Workspace: Invalid macro expansion

I also tried using Visual Studio CMake Folder option. We are using Visual Studio IDE with cmake integration. When I tried to generate cache for Windows target system I get below error.

Severity Code Description Project File Line Suppression State  
Error (active) Failed to evaluate macro ‘${CMAKE\_SYSTEM\_PROCESSOR}’. D:\TW\Workspace\CMakePresets.json 1

If I try same preset for Linux targets it works fine.

AM I doing anything wrong ?

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [May 5, 2023, 10:17pm UTC](https://discourse.cmake.org/t/disabling-present-for-linux-arm64-on-linux-arm64-target-machine/8058/2 "2023-05-05T22:17:08Z")

</div>

`${CMAKE_SYSTEM_PROCESSOR}` is not a valid macro expansion. It is a CMake cache variable, but you cannot read those in a presets file. The behavior under Windows is expected. The behavior under Linux is not, it should also be giving you an error there too.
