summaryrefslogtreecommitdiff
path: root/Tests/LinkLanguage/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/LinkLanguage/CMakeLists.txt')
-rw-r--r--Tests/LinkLanguage/CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/LinkLanguage/CMakeLists.txt b/Tests/LinkLanguage/CMakeLists.txt
new file mode 100644
index 000000000..b4e53925d
--- /dev/null
+++ b/Tests/LinkLanguage/CMakeLists.txt
@@ -0,0 +1,15 @@
+cmake_minimum_required(VERSION 2.7.20090708)
+project(LinkLanguage C CXX)
+
+add_library(foo STATIC foo.cxx)
+add_executable(LinkLanguage LinkLanguage.c)
+
+# Export the target now to compute its link interface and implementation.
+# This tests that the link info is recomputed after the library is linked.
+export(TARGETS LinkLanguage FILE LinkLanguageTargets.cmake)
+
+target_link_libraries(LinkLanguage foo)
+
+# CMake should now automatically choose CXX for linking, so we need
+# not set the property:
+#set_property(TARGET LinkLanguage PROPERTY LINKER_LANGUAGE CXX)