diff options
author | Craig Scott <craig.scott@crascit.com> | 2018-08-16 12:21:25 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2018-08-16 12:21:25 (GMT) |
commit | b88bf6796e72691d4e7b5e5f0659734fc9f9089a (patch) | |
tree | e40feea3d8b782b4a8dd67e753c2a4ce36020c09 /Tests/RunCMake/export | |
parent | c4ab098097f4fe1bc85ee29c6de390dff435f63f (diff) | |
download | CMake-b88bf6796e72691d4e7b5e5f0659734fc9f9089a.zip CMake-b88bf6796e72691d4e7b5e5f0659734fc9f9089a.tar.gz CMake-b88bf6796e72691d4e7b5e5f0659734fc9f9089a.tar.bz2 |
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.
Diffstat (limited to 'Tests/RunCMake/export')
-rw-r--r-- | Tests/RunCMake/export/ExportPropertiesUndefined.cmake | 11 | ||||
-rw-r--r-- | Tests/RunCMake/export/RunCMakeTest.cmake | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/export/ExportPropertiesUndefined.cmake b/Tests/RunCMake/export/ExportPropertiesUndefined.cmake new file mode 100644 index 0000000..aa529f2 --- /dev/null +++ b/Tests/RunCMake/export/ExportPropertiesUndefined.cmake @@ -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 +) diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake index 10ced90..46bb1fc 100644 --- a/Tests/RunCMake/export/RunCMakeTest.cmake +++ b/Tests/RunCMake/export/RunCMakeTest.cmake @@ -8,3 +8,4 @@ run_cmake(NoExportSet) run_cmake(ForbiddenToExportInterfaceProperties) run_cmake(ForbiddenToExportImportedProperties) run_cmake(ForbiddenToExportPropertyWithGenExp) +run_cmake(ExportPropertiesUndefined) |