-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge topic 'restore-link-interface-objlib-with-unity' into release-3.28
5b8e9e0 Restore support for TARGET_OBJECTS in link interfaces with unity builds 1313c78 Tests: Update RunCMake.TargetObjects cmake_minimum_required version Acked-by: Kitware Robot <[email protected]> Merge-request: !9279
- Loading branch information
Showing
9 changed files
with
45 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
cmake_minimum_required(VERSION 3.3) | ||
cmake_minimum_required(VERSION 3.5) | ||
project(${RunCMake_TEST} LANGUAGES NONE) | ||
include(${RunCMake_TEST}.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extern int UnityObj1(void); | ||
extern int UnityObj2(void); | ||
|
||
int main(void) | ||
{ | ||
return UnityObj1() + UnityObj2(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
int UnityObj1(void) | ||
{ | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
int UnityObj2(void) | ||
{ | ||
return 0; | ||
} |