summaryrefslogtreecommitdiffstats
path: root/Tests/ObjectLibrary/ExportLanguages/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ObjectLibrary/ExportLanguages/CMakeLists.txt')
-rw-r--r--Tests/ObjectLibrary/ExportLanguages/CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/ObjectLibrary/ExportLanguages/CMakeLists.txt b/Tests/ObjectLibrary/ExportLanguages/CMakeLists.txt
new file mode 100644
index 0000000..22c92a7
--- /dev/null
+++ b/Tests/ObjectLibrary/ExportLanguages/CMakeLists.txt
@@ -0,0 +1,15 @@
+cmake_minimum_required(VERSION 2.8)
+project(ExportLanguages CXX)
+add_library(ExportLanguagesA OBJECT a.cxx)
+add_library(ExportLanguagesB STATIC a.c $<TARGET_OBJECTS:ExportLanguagesA>)
+
+# Verify that object library languages are propagated.
+export(TARGETS ExportLanguagesB NAMESPACE Exp FILE BExport.cmake)
+include(ExternalProject)
+ExternalProject_Add(ExportLanguagesTest
+ SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ExportLanguagesTest"
+ BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/ExportLanguagesTest"
+ DOWNLOAD_COMMAND ""
+ INSTALL_COMMAND ""
+)
+add_dependencies(ExportLanguagesTest ExportLanguagesA ExportLanguagesB)