CMAKE_CURRENT_LIST_LINE

From Get docs
Cmake/docs/3.21/variable/cmake current list line


CMAKE_CURRENT_LIST_LINE

The line number of the current file being processed.

This is the line number of the file currently being processed by cmake.

If CMake is currently processing deferred calls scheduled by the cmake_language(DEFER) command, this variable evaluates to DEFERRED instead of a specific line number.

© 2000–2021 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.21/variable/CMAKE_CURRENT_LIST_LINE.html