Files
CMake/Tests/RunCMake/define_property/RunCMakeTest.cmake
T
FeRD (Frank Dana) 7aacae4e0e Tests: Add unit tests for property redefinition
From reading `Source/cmDefinePropertyCommand.cxx` and
`Source/cmPropertyDefinition.cxx`, attempts to use `define_property()`
to redefine an existing property will be silently ignored.
Once a property is defined, it cannot be redefined.

Add some unit tests to confirm this behavior of `define_property()`
remains as expected based on the current implementation.
2024-01-29 05:23:37 -05:00

11 lines
452 B
CMake

include(RunCMake)
run_cmake(define_property)
run_cmake(define_property-redefine)
run_cmake(define_property-INITIALIZE_FROM_VARIABLE)
run_cmake(define_property-INITIALIZE_FROM_VARIABLE-invalid_1)
run_cmake(define_property-INITIALIZE_FROM_VARIABLE-invalid_2)
run_cmake(define_property-INITIALIZE_FROM_VARIABLE-non_target)
run_cmake(define_property-INITIALIZE_FROM_VARIABLE-wrong_suffix)
run_cmake(define_property-INITIALIZE_FROM_VARIABLE-no_underscore)