mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 12:49:50 -05:00
Tests: Extend ObjectLibrary test with case for object lib dependencies
Add the test case from commit bab24e782c (target_link_libraries:
Propagate dependencies of object libraries, 2018-12-10,
v3.14.0-rc1~260^2) to the main ObjectLibrary test.
This commit is contained in:
@@ -73,3 +73,5 @@ add_executable(UseABstaticObjs $<TARGET_OBJECTS:UseABstatic>)
|
|||||||
target_link_libraries(UseABstaticObjs ABstatic)
|
target_link_libraries(UseABstaticObjs ABstatic)
|
||||||
|
|
||||||
add_subdirectory(ExportLanguages)
|
add_subdirectory(ExportLanguages)
|
||||||
|
|
||||||
|
add_subdirectory(Transitive)
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
cmake_policy(SET CMP0022 NEW)
|
||||||
|
add_library(FooStatic STATIC FooStatic.c)
|
||||||
|
|
||||||
|
add_library(FooObject1 OBJECT FooObject.c)
|
||||||
|
target_link_libraries(FooObject1 PRIVATE FooStatic)
|
||||||
|
add_executable(Transitive1 Transitive.c)
|
||||||
|
target_link_libraries(Transitive1 PRIVATE FooObject1)
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
int FooObject(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
int FooStatic(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extern int FooObject(void);
|
||||||
|
extern int FooStatic(void);
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
return FooObject() + FooStatic();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user