diff options
author | Deniz Bahadir <dbahadir@benocs.com> | 2017-12-14 19:26:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-03-01 14:24:25 (GMT) |
commit | 9a7f039ee7d3f40d6d041fd0d1ef43f92faf8996 (patch) | |
tree | 9add3097e040194c966cc3b621514349863094fd /Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake | |
parent | dfb6e84082884f908ffad4594d2712d9edfd2cc0 (diff) | |
download | CMake-9a7f039ee7d3f40d6d041fd0d1ef43f92faf8996.zip CMake-9a7f039ee7d3f40d6d041fd0d1ef43f92faf8996.tar.gz CMake-9a7f039ee7d3f40d6d041fd0d1ef43f92faf8996.tar.bz2 |
objlib: Allow `OBJECT` libraries to link to `OBJECT` libraries.
Note: This still does not link the object-files of the `OBJECT` library
from the right-hand side of `target_link_libraries` to the target on the
left-hand side. (In this particular case of another `OBJECT` library on
the left-hand side this would not make any sense anyway. The target on
the left-hand side has no link-step.)
Issue: #14778
Diffstat (limited to 'Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake index 6724da1..287331b 100644 --- a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake +++ b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake @@ -24,10 +24,23 @@ function (run_object_lib_build name) run_cmake_command(${name}-build ${CMAKE_COMMAND} --build .) endfunction () +function (run_object_lib_build2 name) + # Use a single build tree for a few tests without cleaning. + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-build) + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + run_cmake(${name}) + set(RunCMake_TEST_OUTPUT_MERGE 1) + run_cmake_command(${name}-build ${CMAKE_COMMAND} --build .) +endfunction () + run_object_lib_build(LinkObjLHSShared) run_object_lib_build(LinkObjLHSStatic) run_object_lib_build(LinkObjRHSShared) run_object_lib_build(LinkObjRHSStatic) +run_object_lib_build2(LinkObjRHSObject) +run_object_lib_build2(LinkObjRHSObject2) run_cmake(MissingSource) run_cmake(ObjWithObj) |