diff options
Diffstat (limited to 'Tests/RunCMake/TargetObjects/Unity.cmake')
-rw-r--r-- | Tests/RunCMake/TargetObjects/Unity.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/TargetObjects/Unity.cmake b/Tests/RunCMake/TargetObjects/Unity.cmake new file mode 100644 index 0000000..9c8e5c9 --- /dev/null +++ b/Tests/RunCMake/TargetObjects/Unity.cmake @@ -0,0 +1,13 @@ +enable_language(C) + +# Test transforming the set of object files provided by an object library. +set(CMAKE_UNITY_BUILD 1) + +add_library(UnityObj1 OBJECT UnityObj1.c) +add_library(UnityObj2 OBJECT UnityObj2.c) + +add_library(UnityObj2Iface INTERFACE) +target_link_libraries(UnityObj2Iface INTERFACE $<TARGET_OBJECTS:UnityObj2>) + +add_executable(UnityMain UnityMain.c) +target_link_libraries(UnityMain PRIVATE UnityObj1 UnityObj2Iface) |