summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/export
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/export')
-rw-r--r--Tests/RunCMake/export/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/export/TryCompileExport.cmake9
2 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake
index 0e6020f0f..ee00b273c 100644
--- a/Tests/RunCMake/export/RunCMakeTest.cmake
+++ b/Tests/RunCMake/export/RunCMakeTest.cmake
@@ -18,3 +18,4 @@ run_cmake(DependOnDoubleExport)
run_cmake(UnknownExport)
run_cmake(NamelinkOnlyExport)
run_cmake(SeparateNamelinkExport)
+run_cmake(TryCompileExport)
diff --git a/Tests/RunCMake/export/TryCompileExport.cmake b/Tests/RunCMake/export/TryCompileExport.cmake
new file mode 100644
index 000000000..5ad7c6ee0
--- /dev/null
+++ b/Tests/RunCMake/export/TryCompileExport.cmake
@@ -0,0 +1,9 @@
+enable_language(CXX)
+
+add_library(interface INTERFACE)
+install(TARGETS interface EXPORT export)
+export(EXPORT export)
+
+add_library(imported IMPORTED INTERFACE)
+
+try_compile(tc "${CMAKE_CURRENT_BINARY_DIR}/tc" "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" LINK_LIBRARIES imported)