summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ObjectLibrary/Dependencies.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/ObjectLibrary/Dependencies.cmake')
-rw-r--r--Tests/RunCMake/ObjectLibrary/Dependencies.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/ObjectLibrary/Dependencies.cmake b/Tests/RunCMake/ObjectLibrary/Dependencies.cmake
new file mode 100644
index 0000000..4e3db5f
--- /dev/null
+++ b/Tests/RunCMake/ObjectLibrary/Dependencies.cmake
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 3.7)
+
+project(Dependencies)
+
+add_library(myobj OBJECT ${CMAKE_BINARY_DIR}/depends_obj.cpp)
+add_library(mylib STATIC $<TARGET_OBJECTS:myobj> depends_lib.cpp)
+add_executable(myexe depends_main.cpp)
+target_link_libraries(myexe mylib)
+
+enable_testing()
+add_test(NAME myexe COMMAND $<TARGET_FILE:myexe>)