microsoft / microsoft/vscode-cmake-tools
Use CMAKE_CROSSCOMPILING_EMULATOR to run cross compiled executables
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
### 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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the CMake Tools “Run in terminal” execution path and how it obtains CMake configuration variables. Reproduce the Linux cross-compilation case with CMAKE_CROSSCOMPILING_EMULATOR set, then verify that running the executable invokes the configured emulator rather than the host directly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, typescript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100