CMAKE_SYSTEM_PROCESSOR sometimes reports "arm64" (or similar e.g. "arm64-v8a") instead of "aarch64" as you are expecting here. For example, this happens for GCC on macOS. This results in CMake incorrectly trying to build for 32-bit arm, flagging "-mthumb" as a nonsense flag on those systems.
CMAKE_SYSTEM_PROCESSOR sometimes reports "arm64" (or similar e.g. "arm64-v8a") instead of "aarch64" as you are expecting here. For example, this happens for GCC on macOS. This results in CMake incorrectly trying to build for 32-bit arm, flagging "-mthumb" as a nonsense flag on those systems.
https://github.com/DynamoRIO/dynamorio/blob/a7737a1aaa86348bcff14e1846275fcbb0810abd/CMakeLists.txt#L214