| 1 |
# Under CMP0199 OLD, $<CONFIG> matches the selected configuration and every |
| 2 |
# entry in MAP_IMPORTED_CONFIG_<CONFIG>. Under NEW, it should only match the |
| 3 |
# configuration of the consuming target and the selected configuration of the |
| 4 |
# library being consumed. |
| 5 |
function(do_mapped_config_test) |
| 6 |
add_library(lib_mapped INTERFACE IMPORTED) |
| 7 |
set_target_properties(lib_mapped PROPERTIES |
| 8 |
IMPORTED_CONFIGURATIONS "TEST" |
| 9 |
INTERFACE_COMPILE_DEFINITIONS |
| 10 |
"$<$<CONFIG:debug>:DEBUG>;$<$<CONFIG:release>:RELEASE>;$<$<CONFIG:test>:TEST>" |
| 11 |
MAP_IMPORTED_CONFIG_RELEASE "RELEASE;DEBUG;TEST" |
| 12 |
) |
| 13 |
|
| 14 |
add_executable(exe_mapped configtest.c) |
| 15 |
target_compile_definitions(exe_mapped PRIVATE ${ARGN}) |
| 16 |
target_link_libraries(exe_mapped PRIVATE lib_mapped) |
| 17 |
endfunction() |