# RSP files equivalent when using Unix Makefiles

**URL:** https://discourse.cmake.org/t/rsp-files-equivalent-when-using-unix-makefiles/11039
**Category:** Usage
**Tags:** gen:makefiles
**Created:** [June 18, 2024, 10:27am UTC](https://discourse.cmake.org/t/rsp-files-equivalent-when-using-unix-makefiles/11039 "2024-06-18T10:27:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![AntoineN](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/59ef9b/32.png) [@AntoineN](https://discourse.cmake.org/u/AntoineN)
#### Post date: [June 18, 2024, 10:27am UTC](https://discourse.cmake.org/t/rsp-files-equivalent-when-using-unix-makefiles/11039/1 "2024-06-18T10:27:07Z")

</div>

Hello,  
I’m working on a project with CMake, using Ninja generator. I have a post build command to “include” a CRC in the generated binary. It make a 2nd link including the CRC. The command use the .rsp file to have the list of all necessary object files.

I would like to build the project under STM32Cube IDE. The only accepted generator is Unix Makefile using make. When using it, it do not seems to generate a .rsp file.

What could I use in my custom link command to have the list of all generated object?$

Regards  
Antoine

---

<div class="post-metadata">

### Author: ![AntoineN](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/59ef9b/32.png) [@AntoineN](https://discourse.cmake.org/u/AntoineN)
#### Post date: [June 18, 2024, 12:40pm UTC](https://discourse.cmake.org/t/rsp-files-equivalent-when-using-unix-makefiles/11039/2 "2024-06-18T12:40:52Z")

</div>

So…  
I have found the $\<TARGET\_OBJECTS:_CurrentTarget_\>  
It contain the list of all obj. The problem is that all objects are separate by a “;”. Is there a way to retrieve the same list, but without the “;” and jsut a space.

---

<div class="post-metadata">

### Author: ![AntoineN](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/59ef9b/32.png) [@AntoineN](https://discourse.cmake.org/u/AntoineN)
#### Post date: [June 19, 2024, 2:23pm UTC](https://discourse.cmake.org/t/rsp-files-equivalent-when-using-unix-makefiles/11039/3 "2024-06-19T14:23:16Z")

</div>

So, I’m move step by step

I found that I can use $\<TARGET\_OBJECTS:_currentTarget_\> to retrieve all the .obj of the target. And I can use the COMMAND\_EXPAND\_LISTS to remove all the “;” from the object list.

The problem is that TARGET\_OBJECTS contain only the .obj used to generate the target, not all the linked lib “.a”

Is there an equivalent to TARGET\_OBJECTS to retrieve the linked .a lib?

---

<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: [March 14, 2025, 5:52pm UTC](https://discourse.cmake.org/t/rsp-files-equivalent-when-using-unix-makefiles/11039/4 "2025-03-14T17:52:05Z")

</div>

There is `$<TARGET_PROPERTY:LINK_LIBRARIES>` but this only gets direct libraries, not the transitive closure unless [`CMP0189`](https://cmake.org/cmake/help/git-master/policy/CMP0189.html) is set to `NEW` (which will be available in CMake 4.1 which will be released sometime this summer).
