# Report Caller location?

**URL:** https://discourse.cmake.org/t/report-caller-location/11436
**Category:** Code
**Created:** [August 13, 2024, 4:33pm UTC](https://discourse.cmake.org/t/report-caller-location/11436 "2024-08-13T16:33:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![duaneellis\_inno](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/d/f04885/32.png) [@duaneellis\_inno](https://discourse.cmake.org/u/duaneellis_inno)
#### Post date: [August 13, 2024, 4:33pm UTC](https://discourse.cmake.org/t/report-caller-location/11436/1 "2024-08-13T16:33:18Z")

</div>

I am trying to refactor a number of things in our CMAKE code

As a RESULT - I have a number of ‘assert-like’ functions

for example,  
assert\_ENV\_VAR\_DEFINED( NAME OUTVAR )

This verifies that the NAMED env var exists  
If not - it throws an error and exits.  
If it does exist - the OUTVAR is set and we move on…

What I want to do is print the LOCATION of the CALLER

How can I print the location of the function caller?

---

<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: [July 25, 2025, 3:27pm UTC](https://discourse.cmake.org/t/report-caller-location/11436/2 "2025-07-25T15:27:58Z")

</div>

There’s no access to that location at this time.
