EXPORT_PROPERTIES: Add test for an undefined property

The added test verifies that a property listed in EXPORT_PROPERTIES
can be undefined. It confirms the crash recorded in issue #18260.
This commit is contained in:
Craig Scott 2018-08-16 22:21:25 +10:00
parent c4ab098097
commit b88bf6796e
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,11 @@
enable_language(CXX)
add_library(foo empty.cpp)
set_target_properties(foo PROPERTIES
EXPORT_PROPERTIES "NotDefinedProp"
)
export(TARGETS foo FILE "${CMAKE_CURRENT_BINARY_DIR}/foo.cmake")
install(TARGETS foo EXPORT fooExport
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

View File

@ -8,3 +8,4 @@ run_cmake(NoExportSet)
run_cmake(ForbiddenToExportInterfaceProperties)
run_cmake(ForbiddenToExportImportedProperties)
run_cmake(ForbiddenToExportPropertyWithGenExp)
run_cmake(ExportPropertiesUndefined)