summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-03-20 10:16:50 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-03-20 10:17:00 (GMT)
commit119d1dadce8e2dfac80a9f27087355af3256c3e8 (patch)
treeac7a791da84e52c5d1f76297bfca53ec09b93207 /Tests
parent8fad32f5b9ebf47ced97bfb40d73ffafb5d96aca (diff)
parent8affe9aa336b873e9c8e40ec5911ffe23c2ef03a (diff)
downloadCMake-119d1dadce8e2dfac80a9f27087355af3256c3e8.zip
CMake-119d1dadce8e2dfac80a9f27087355af3256c3e8.tar.gz
CMake-119d1dadce8e2dfac80a9f27087355af3256c3e8.tar.bz2
Merge topic 'export-repeat' into release-3.17
8affe9aa33 export: Fix use-after-free on multiple calls overwriting same FILE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4494
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/export/Repeat.cmake5
-rw-r--r--Tests/RunCMake/export/Repeat/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/export/RunCMakeTest.cmake1
3 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/export/Repeat.cmake b/Tests/RunCMake/export/Repeat.cmake
new file mode 100644
index 0000000..f3262e7
--- /dev/null
+++ b/Tests/RunCMake/export/Repeat.cmake
@@ -0,0 +1,5 @@
+add_library(foo INTERFACE)
+export(TARGETS foo FILE foo.cmake)
+export(TARGETS foo FILE foo.cmake)
+add_subdirectory(Repeat)
+include(CMakePackageConfigHelpers)
diff --git a/Tests/RunCMake/export/Repeat/CMakeLists.txt b/Tests/RunCMake/export/Repeat/CMakeLists.txt
new file mode 100644
index 0000000..b37f6ca
--- /dev/null
+++ b/Tests/RunCMake/export/Repeat/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_library(bar INTERFACE)
+export(TARGETS bar FILE ${CMAKE_BINARY_DIR}/foo.cmake)
diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake
index 4d2f217..df35d95 100644
--- a/Tests/RunCMake/export/RunCMakeTest.cmake
+++ b/Tests/RunCMake/export/RunCMakeTest.cmake
@@ -2,6 +2,7 @@ include(RunCMake)
run_cmake(CustomTarget)
run_cmake(Empty)
+run_cmake(Repeat)
run_cmake(TargetNotFound)
run_cmake(AppendExport)
run_cmake(OldIface)