CMake/Tests/RunCMake
Brad King 711b63f7e0 Add policy CMP0019 to skip include/link variable re-expansion
Historically CMake has always expanded ${} variable references in the
values given to include_directories(), link_directories(), and
link_libraries().  This has been unnecessary since general ${}
evaluation syntax was added to the language a LONG time ago, but has
remained for compatibility with VERY early CMake versions.

For a long time the re-expansion was a lightweight operation because it
was only processed once at the directory level and the fast-path of
cmMakefile::ExpandVariablesInString was usually taken because values did
not have any '$' in them.  Then commit d899eb71 (Call
ExpandVariablesInString for each target's INCLUDE_DIRECTORIES,
2012-02-22) made the operation a bit heavier because the expansion is
now needed on a per-target basis.  In the future we will support
generator expressions in INCLUDE_DIRECTORIES with $<> syntax, so the
fast-path in cmMakefile::ExpandVariablesInString will no longer be taken
and re-expansion will be very expensive.

Add policy CMP0019 to skip the re-expansion altogether in NEW behavior.
In OLD behavior perform the expansion but improve the fast-path
heuristic to match ${} but not $<>.  If the policy is not set then warn
if expansion actually does anything.  We expect this to be encountered
very rarely in practice.
2012-12-07 09:51:19 -05:00
..
CMP0019 Add policy CMP0019 to skip include/link variable re-expansion 2012-12-07 09:51:19 -05:00
GeneratorExpression Genex: Don't segfault on $<FOO,> 2012-11-27 09:12:39 -05:00
Languages Do not crash on SHARED library without language (#13324) 2012-06-20 11:26:05 -04:00
ObjectLibrary Test OBJECT library language propagation 2012-03-16 10:12:30 -04:00
SolutionGlobalSections Add tests for VS_SOLUTION_GLOBAL_SECTIONS 2012-11-16 08:16:10 -05:00
TargetPropertyGeneratorExpressions GenEx: Validate target and property names. 2012-10-09 08:26:45 -04:00
build_command Use generalized RunCMake test infrastrucure for build_command test 2012-03-12 09:33:21 -04:00
find_package find_package: Test rejection of required+optional components 2012-03-19 10:53:36 -04:00
include include: Ignore empty string as file name (#13388) 2012-07-10 11:05:04 -04:00
include_directories GenEx: Fix reporting about not-found include directories and libraries. 2012-10-17 16:23:32 -04:00
include_external_msproject Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
list list: Handle errors on empty lists more gracefully (#13138) 2012-04-17 11:07:07 -04:00
load_command load_command: Deprecate and document pending removal 2012-11-07 09:24:05 -05:00
CMakeLists.txt Add policy CMP0019 to skip include/link variable re-expansion 2012-12-07 09:51:19 -05:00
RunCMake.cmake Teach RunCMake tests to allow custom checks 2012-04-19 08:32:57 -04:00