Cannot use custom properties with suffix `_LOCATION` in generator expressions
I set some properties on executable that has the suffix _LOCATION
and this code seems to throw an error if any property ends with that suffix when CMP0026 is set to NEW. I don't particularly wish to set the policy to OLD, and these names come from a properties file I read that is provided to me. I can perhaps set a suffix to work around it but am hesitant to do so.
add_library(app_interface INTERFACE
target_compile_definitions(app_interface INTERFACE
DERIVATIVE_$<TARGET_PROPERTY:DERIVATIVE>
EXAMPLE_CODE_LOCATION_$<TARGET_PROPERTY:EXAMPLE_CODE_LOCATION>
)
add_executable(application)
set_target_properties(application PROPERTIES
DERIVATIVE FOO
EXAMPLE_CODE_LOCATION RAM
)
target_link_libraries(application PRIVATE
app_interface
)
Adding a suffix to the property with _LOCATION
will allow the code to generate without errors. So maybe the logic for the cmTargetPropertyComputer.h
should be a bit smarter?