Use CMAKE_CROSSCOMPILING_EMULATOR to run cross compiled executables
Brief Issue Summary
When a program is cross compiled and I try to run it (Run in terminal), CMakeTools run it directly without taking into consideration that there is an emulator set.
Example:
set(CMAKE_CROSSCOMPILING_EMULATOR ${CMAKE_SYSROOT}/tools/HEXAGON_Tools/8.0.10/Tools/bin/hexagon-sim FORCE "The simulator")
Expected:
The emulator should be used to run the executable
Apparent Behavior:
The executable is run directly on the host system
Platform and Versions
**Operating System**: Linux
**CMake Version**: 3.10.2
**VSCode Version**: 1.27.2
**CMake Tools Extension Version**: 1.1.2
**Compiler/Toolchain**: Custom (Based on CLang 3.9.0)
Good idea! I'll add it to 1.2.0.
Is there any news on this issue?
I would really love to have it. In combination with docker multi-platform support this would faciliate cross platform development extremely and give a great IDE experience.
In the meantime, is there any workaround to use an emulator when using VSCode and CMake with presets?
Note that the CMAKE_ variable just initializes a target property (https://cmake.org/cmake/help/latest/prop_tgt/CROSSCOMPILING_EMULATOR.html), which would be the more proper thing to look at when deciding how to run a target.