diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2017-02-18 21:27:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-22 20:21:06 (GMT) |
commit | 624021a09e7850b1f6cb75af40b17a38d98c95e3 (patch) | |
tree | 5d6a3216ae39575a69f78692f847a513549c4ee8 /Tests/RunCMake/ObjectLibrary/Dependencies.cmake | |
parent | 5da9266af50af3c2c1a827a1d162c8a9b16e7fd9 (diff) | |
download | CMake-624021a09e7850b1f6cb75af40b17a38d98c95e3.zip CMake-624021a09e7850b1f6cb75af40b17a38d98c95e3.tar.gz CMake-624021a09e7850b1f6cb75af40b17a38d98c95e3.tar.bz2 |
Add test for object library dependencies
Issue: #16615
Diffstat (limited to 'Tests/RunCMake/ObjectLibrary/Dependencies.cmake')
-rw-r--r-- | Tests/RunCMake/ObjectLibrary/Dependencies.cmake | 11 |
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>) |