mirror of
https://github.com/reactos/CMake.git
synced 2024-11-27 21:41:03 +00: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:
parent
07a7bc0e3f
commit
3b3de0fd17
@ -73,3 +73,5 @@ add_executable(UseABstaticObjs $<TARGET_OBJECTS:UseABstatic>)
|
||||
target_link_libraries(UseABstaticObjs ABstatic)
|
||||
|
||||
add_subdirectory(ExportLanguages)
|
||||
|
||||
add_subdirectory(Transitive)
|
||||
|
7
Tests/ObjectLibrary/Transitive/CMakeLists.txt
Normal file
7
Tests/ObjectLibrary/Transitive/CMakeLists.txt
Normal file
@ -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)
|
4
Tests/ObjectLibrary/Transitive/FooObject.c
Normal file
4
Tests/ObjectLibrary/Transitive/FooObject.c
Normal file
@ -0,0 +1,4 @@
|
||||
int FooObject(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
4
Tests/ObjectLibrary/Transitive/FooStatic.c
Normal file
4
Tests/ObjectLibrary/Transitive/FooStatic.c
Normal file
@ -0,0 +1,4 @@
|
||||
int FooStatic(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
7
Tests/ObjectLibrary/Transitive/Transitive.c
Normal file
7
Tests/ObjectLibrary/Transitive/Transitive.c
Normal file
@ -0,0 +1,7 @@
|
||||
extern int FooObject(void);
|
||||
extern int FooStatic(void);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return FooObject() + FooStatic();
|
||||
}
|
Loading…
Reference in New Issue
Block a user