# Compile unit test natively and cross compile code for embedded target

**URL:** https://discourse.cmake.org/t/compile-unit-test-natively-and-cross-compile-code-for-embedded-target/3607
**Category:** Usage
**Created:** [June 22, 2021, 3:03pm UTC](https://discourse.cmake.org/t/compile-unit-test-natively-and-cross-compile-code-for-embedded-target/3607 "2021-06-22T15:03:26Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![murtiko](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/dc4da7/32.png) [@murtiko](https://discourse.cmake.org/u/murtiko)
#### Post date: [June 23, 2021, 8:47am UTC](https://discourse.cmake.org/t/compile-unit-test-natively-and-cross-compile-code-for-embedded-target/3607/2 "2021-06-23T08:47:35Z")

</div>

It looks as though the first question has already been answered before:

> [@Using multiple toolchains in the same project?](https://discourse.cmake.org/t/using-multiple-toolchains-in-the-same-project/1505):
>
> I’m looking at adding proper support for WebAssembly to the CMake build files for a project (Halide) and am a little unclear as to whether there is a simple way to make this happen. Here’s the problem: Halide is, itself, a cross-compiler; any instance of libHalide can generate object code for any of the supported targets for which it is configured. For performance reasons, it’s extremely desirable that libHalide be compiled to the native ‘host’ configuration, so on (say) x64-Linux, we alwa…

---

_[View the full topic](https://discourse.cmake.org/t/compile-unit-test-natively-and-cross-compile-code-for-embedded-target/3607)._
