Commit Graph

11 Commits

Author SHA1 Message Date
Craig Scott
c267ea1c3e GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests 2017-12-30 09:35:56 +11:00
Deniz Bahadir
6a3922bebe Add new target-property IMPORTED_GLOBAL.
The purpose of this new `IMPORTED_GLOBAL` target-property is to prolong
the lifetime and scope of `IMPORTED` targets in such a way as if they
had been created with the keyword `GLOBAL` in the first place.

* It can only be set to `TRUE`. That means, a local `IMPORTED` target
  can be promoted to global scope but a global `IMPORTED` target cannot
  be degraded to local scope!
* Setting it to `TRUE` only succeeds if done from within the same
  directory in which the `IMPORTED` target was created in the first
  place.

Fixes #17256.
2017-11-07 15:08:41 +01:00
Brad King
a7005c985d Tests: Add case for legacy source file property behavior
The change in commit 3b95ab5693 (Performance: Improve efficiency of
source file lookup in cmMakefile, 2017-08-17) broke some legacy behavior
of source file properties in which the order sources are first resolved
with extensions affects how setting properties without extensions works.
It has been reverted for now, but the discovery was made after merging
because the broken case was not covered by our test suite.

Add a test case representing the legacy behavior.

Issue: #15208
2017-09-25 09:06:35 -04:00
Brad King
01826231f8 Tests: Add case for GENERATOR_IS_MULTI_CONFIG 2017-04-04 09:49:01 -04:00
Brad King
d0be1e15c3 Add directory properties to get source and binary directories
Add SOURCE_DIR and BINARY_DIR directory properties that return the
absolute paths to the corresponding directories.  These correspond
to the target properties of the same names that we already have.
2016-09-19 14:00:50 -04:00
Brad King
cbca65826c Add directory property to list buildsystem targets
Add a BUILDSYSTEM_TARGETS property to allow project code to traverse
the list of its own targets in a given directory.
2016-09-19 14:00:32 -04:00
Brad King
7a4b8d0dc2 Add a directory property to list subdirectories
Add a SUBDIRECTORIES directory property to allow project code to
traverse the directory structure of itself as CMake sees it.
2016-09-19 13:59:43 -04:00
Clifford Yapp
45c5f8cad2 Add SOURCE_DIR and BINARY_DIR target properties
This will allow project code to recover the directory information about
where a target was created.
2015-07-21 14:19:35 -04:00
Brad King
e5ca59b456 Tests: Move command failure cases into RunCMake infrastructure
Move failure cases from the CMake.{If,List,While,GetProperty} tests over
to the RunCMake.{if,list,while,get_property} tests to use the more
modern infrastructure.  This also avoids using REGEX_ESCAPE_STRING to
try to regex-match full paths.
2015-07-14 10:25:38 -04:00
Stephen Kelly
6fb306ea3b Test expected value of DEBUG_CONFIGURATIONS global property. 2015-04-12 20:08:46 +02:00
Ben Boeckel
c6d03a1072 tests: add tests for querying properties 2015-01-11 11:45:44 -05:00