[cmake-developers] [CMake 0014118]: CMAKE_CURRENT_LIST_LINE reports wrong line number
Mantis Bug Tracker
mantis at public.kitware.com
Sat Apr 27 20:57:42 EDT 2013
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=14118
======================================================================
Reported By: Kyle Heath
Assigned To:
======================================================================
Project: CMake
Issue ID: 14118
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2013-04-27 20:57 EDT
Last Modified: 2013-04-27 20:57 EDT
======================================================================
Summary: CMAKE_CURRENT_LIST_LINE reports wrong line number
Description:
The behavior of CMAKE_CURRENT_LIST_LINE doesn't match the documentation. It
should return the line of the CMakeList.txt at bottom of the call stack, but
instead it returns the line number of the macro file where it appears.
Steps to Reproduce:
Attached is a CMakeLists.txt that prints the value of CMAKE_CURRENT_LIST_LINE
(Case A) and then calls a macro in my_macros.cmake that prints the value of
CMAKE_CURRENT_LIST_LINE (Case B).
Case A gives the correct line number... line 3
Case B gives the incorrect line number... line 7 (of my_macros.cmake) but should
be line 5 (of CMakeLists.txt)
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-04-27 20:57 Kyle Heath New Issue
2013-04-27 20:57 Kyle Heath File Added: cmake_line_bug.tar.gz
======================================================================
More information about the cmake-developers
mailing list