diff options
author | Craig Scott <craig.scott@crascit.com> | 2018-08-18 00:51:06 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-08-18 00:51:17 (GMT) |
commit | 6b1089399a54269b8e12830a655dc9f0ae18995a (patch) | |
tree | 4a248c8f07335123d8a5b760a7eb9053421278e2 /Tests | |
parent | 43027ce56dfc8b11519a4ef1a11f5543d8568e03 (diff) | |
parent | dbd3e2c53d2fb0c19a08a0fe8780df5eb4f89476 (diff) | |
download | CMake-6b1089399a54269b8e12830a655dc9f0ae18995a.zip CMake-6b1089399a54269b8e12830a655dc9f0ae18995a.tar.gz CMake-6b1089399a54269b8e12830a655dc9f0ae18995a.tar.bz2 |
Merge topic 'export-properties-undefined'
dbd3e2c53d EXPORT_PROPERTIES: Prevent null dereference for undefined property
b88bf6796e EXPORT_PROPERTIES: Add test for an undefined property
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2294
Diffstat (limited to 'Tests')
-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) |