# How to get listing file when cross compile

**URL:** <https://discourse.cmake.org/t/how-to-get-listing-file-when-cross-compile/2297>\
**Category:** Code\
**Tags:** os:linux\
**Created:** [December 4, 2020, 1:20pm UTC](https://discourse.cmake.org/t/how-to-get-listing-file-when-cross-compile/2297 "2020-12-04T13:20:34Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [December 4, 2020, 8:43pm UTC](https://discourse.cmake.org/t/how-to-get-listing-file-when-cross-compile/2297/5 "2020-12-04T20:43:30Z")

</div>

> [@Massimiliano\_Cialdi](#):
>
> I looked among the variables, but I didn’t find what I was looking for. Before going to browse through the cmake modules, could you suggest how I can do it?

I think we’d need a new generator expression. Something like `$<TARGET_OBJECT_DIR:tgt>` perhaps (in order to support multi-config generators)? The `foreach` loop is likely to continue to be necessary without some other feature that would need more work. Could you please file a feature request on [the issue tracker](https://gitlab.kitware.com/cmake/cmake/-/issues)?

---

_[View the full topic](https://discourse.cmake.org/t/how-to-get-listing-file-when-cross-compile/2297)._
