CMake/Tests/RunCMake/TargetSources
Brad King 7c36d2067b cmListFileBacktrace: Refactor storage to provide efficient value semantics
Since commit v3.4.0-rc1~321^2~2 (Genex: Store a backtrace, not a pointer
to one, 2015-07-08) we treat cmListFileBacktrace instances as
lightweight values.  This was true at the time only because the
backtrace information was kept in the cmState snapshot hierarchy.
However, that forced us to accumulate a lot of otherwise short-lived
snapshots just to have the backtrace fields available for reference by
cmListFileBacktrace instances.  Recent refactoring made backtrace
instances independent of the snapshot hierarchy to avoid accumulating
short-lived snapshots.  This came at the cost of making backtrace values
heavy again, leading to lots of string coying and slower execution.

Fix this by refactoring cmListFileBacktrace to provide value semantics
with efficient shared storage underneath.  Teach cmMakefile to maintain
its call stack using an instance of cmListFileBacktrace.  This approach
allows the current backtrace to be efficiently saved whenever it is
needed.

Also teach cmListFileBacktrace the notion of a file-level scope.  This
is useful for messages about the whole file (e.g. during parsing) that
are not specific to any line within it.  Push the CMakeLists.txt scope
for each directory and never pop it.  This ensures that we always have
some context information and simplifies cmMakefile::IssueMessage.
Push/pop a file-level scope as each included file is processed.  This
supersedes cmParseFileScope and improves diagnostic message context
information in a few places.  Fix the corresponding test cases to expect
the improved output.
2016-04-18 09:21:19 -04:00
..
CMP0026-LOCATION-result.txt cmTarget: Fix listing of source files at configure-time. 2014-04-13 10:59:50 +02:00
CMP0026-LOCATION.cmake cmTarget: Fix listing of source files at configure-time. 2014-04-13 10:59:50 +02:00
CMakeLists.txt cmTarget: Fix listing of source files at configure-time. 2014-04-13 10:59:50 +02:00
ConfigNotAllowed-result.txt
ConfigNotAllowed-stderr.txt
ConfigNotAllowed.cmake
ExportBuild-result.txt Allow export of targets with INTERFACE_SOURCES. 2015-02-11 00:51:34 +01:00
ExportBuild.cmake Export: Disallow export of targets with INTERFACE_SOURCES 2014-11-29 12:24:59 +01:00
OriginDebug-result.txt
OriginDebug-stderr.txt Tests: Fix RunCMake.TargetSources on Xcode 1.5 2014-06-06 10:28:32 -04:00
OriginDebug.cmake cmTarget: Don't allow relative paths in INTERFACE_SOURCES 2014-11-29 12:24:59 +01:00
OriginDebugIDE-result.txt
OriginDebugIDE-stderr.txt cmListFileBacktrace: Refactor storage to provide efficient value semantics 2016-04-18 09:21:19 -04:00
OriginDebugIDE.cmake
RelativePathInInterface-result.txt cmTarget: Don't allow relative paths in INTERFACE_SOURCES 2014-11-29 12:24:59 +01:00
RelativePathInInterface-stderr.txt cmTarget: Don't allow relative paths in INTERFACE_SOURCES 2014-11-29 12:24:59 +01:00
RelativePathInInterface.cmake cmTarget: Don't allow relative paths in INTERFACE_SOURCES 2014-11-29 12:24:59 +01:00
RunCMakeTest.cmake Allow export of targets with INTERFACE_SOURCES. 2015-02-11 00:51:34 +01:00
empty_1.cpp
empty_2.cpp
empty_3.cpp Make the SOURCES target property writable. 2014-04-02 23:14:02 +02:00
empty_4.cpp target_sources: New command to add sources to target. 2014-04-02 23:14:02 +02:00
main.cpp cmTarget: Don't allow relative paths in INTERFACE_SOURCES 2014-11-29 12:24:59 +01:00