CMake/Tests/RunCMake/find_package
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
..
PolicyPop Tests: Add case for package version file unmatched policy scope 2015-11-24 14:01:21 -05:00
PolicyPush Tests: Add case for package version file unmatched policy scope 2015-11-24 14:01:21 -05:00
CMakeLists.txt Cygwin: Avoid legacy warnings in RunCMake.* tests 2013-08-13 09:50:15 -04:00
ComponentRequiredAndOptional-result.txt find_package: Test rejection of required+optional components 2012-03-19 10:53:36 -04:00
ComponentRequiredAndOptional-stderr.txt find_package: Test rejection of required+optional components 2012-03-19 10:53:36 -04:00
ComponentRequiredAndOptional.cmake find_package: Test rejection of required+optional components 2012-03-19 10:53:36 -04:00
MissingConfig-stderr.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingConfig.cmake Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingConfigOneName-stderr.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingConfigOneName.cmake Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingConfigRequired-result.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingConfigRequired-stderr.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingConfigRequired.cmake Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingConfigVersion-stderr.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingConfigVersion.cmake Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingModule-stderr.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingModule.cmake Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingModuleRequired-result.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingModuleRequired-stderr.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingModuleRequired.cmake Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingNormal-stderr.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingNormal.cmake Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingNormalRequired-result.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingNormalRequired-stderr.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingNormalRequired.cmake Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingNormalVersion-stderr.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingNormalVersion.cmake Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingNormalWarnNoModuleNew-stderr.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingNormalWarnNoModuleNew.cmake Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingNormalWarnNoModuleOld-stderr.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MissingNormalWarnNoModuleOld.cmake Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MixedModeOptions-result.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MixedModeOptions-stderr.txt Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
MixedModeOptions.cmake Use generalized RunCMake test infrastrucure for find_package test 2012-03-12 09:33:21 -04:00
PolicyPop-result.txt Tests: Add case for package version file unmatched policy scope 2015-11-24 14:01:21 -05:00
PolicyPop-stderr.txt Tests: Add case for package version file unmatched policy scope 2015-11-24 14:01:21 -05:00
PolicyPop.cmake Tests: Add case for package version file unmatched policy scope 2015-11-24 14:01:21 -05:00
PolicyPush-result.txt Tests: Add case for package version file unmatched policy scope 2015-11-24 14:01:21 -05:00
PolicyPush-stderr.txt cmListFileBacktrace: Refactor storage to provide efficient value semantics 2016-04-18 09:21:19 -04:00
PolicyPush.cmake Tests: Add case for package version file unmatched policy scope 2015-11-24 14:01:21 -05:00
RunCMakeTest.cmake Tests: Add case for package version file unmatched policy scope 2015-11-24 14:01:21 -05:00
SetFoundFALSE-stderr.txt find_package: additional test for checking the error message 2012-03-13 16:56:52 -04:00
SetFoundFALSE.cmake find_package: additional test for checking the error message 2012-03-13 16:56:52 -04:00
SetFoundFALSEConfig.cmake find_package: additional test for checking the error message 2012-03-13 16:56:52 -04:00