Cleanup linking
All checks were successful
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 5m23s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 5m14s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 5m40s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 5m41s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 5m53s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 5m54s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 7m0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 6m57s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 5m56s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 5m55s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 6m35s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 6m30s
Bigfoot / Clang Format Checks (push) Successful in 12s
All checks were successful
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 5m23s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 5m14s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 5m40s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 5m41s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 5m53s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 5m54s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 7m0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 6m57s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 5m56s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 5m55s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 6m35s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 6m30s
Bigfoot / Clang Format Checks (push) Successful in 12s
This commit is contained in:
@@ -38,27 +38,53 @@ function(bigfoot_create_bigfile ParentFolder)
|
||||
)
|
||||
endfunction()
|
||||
|
||||
function(bigfoot_compile_flatbuffers BigfootDependencies)
|
||||
set(IncludeFolders "")
|
||||
function(_bigfoot_collect_includes_recursive Target UseAllLinks)
|
||||
get_property(_Visited GLOBAL PROPERTY _BIGFOOT_VISITED_TARGETS)
|
||||
if("${Target}" IN_LIST _Visited)
|
||||
return()
|
||||
endif()
|
||||
set_property(GLOBAL APPEND PROPERTY _BIGFOOT_VISITED_TARGETS "${Target}")
|
||||
|
||||
list(APPEND IncludeFolders ${CMAKE_CURRENT_SOURCE_DIR}/Include)
|
||||
|
||||
foreach(Dependency IN LISTS BigfootDependencies)
|
||||
if(TARGET ${Dependency})
|
||||
get_target_property(DependencyIncludeDirs ${Dependency} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
if(DependencyIncludeDirs)
|
||||
foreach(Dir IN LISTS DependencyIncludeDirs)
|
||||
# Strip $<BUILD_INTERFACE:...> generator expression
|
||||
if(Dir MATCHES "^\\$<BUILD_INTERFACE:(.+)>$")
|
||||
list(APPEND IncludeFolders "${CMAKE_MATCH_1}")
|
||||
elseif(NOT Dir MATCHES "^\\$<")
|
||||
# Pass through plain paths, skip other generator expressions
|
||||
list(APPEND IncludeFolders "${Dir}")
|
||||
endif()
|
||||
endforeach()
|
||||
get_target_property(_IncDirs "${Target}" INTERFACE_INCLUDE_DIRECTORIES)
|
||||
if(_IncDirs)
|
||||
foreach(_Dir IN LISTS _IncDirs)
|
||||
if(_Dir MATCHES "^\\$<BUILD_INTERFACE:(.+)>$")
|
||||
set_property(GLOBAL APPEND PROPERTY _BIGFOOT_INCLUDE_DIRS "${CMAKE_MATCH_1}")
|
||||
elseif(NOT _Dir MATCHES "^\\$<")
|
||||
set_property(GLOBAL APPEND PROPERTY _BIGFOOT_INCLUDE_DIRS "${_Dir}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(UseAllLinks)
|
||||
get_target_property(_Libs "${Target}" LINK_LIBRARIES)
|
||||
else()
|
||||
get_target_property(_Libs "${Target}" INTERFACE_LINK_LIBRARIES)
|
||||
endif()
|
||||
if(NOT _Libs)
|
||||
return()
|
||||
endif()
|
||||
foreach(_Lib IN LISTS _Libs)
|
||||
if(_Lib MATCHES "^\\$<LINK_LIBRARY:[^,]+,(.+)>$")
|
||||
foreach(_Inner IN LISTS CMAKE_MATCH_1)
|
||||
if(TARGET "${_Inner}")
|
||||
_bigfoot_collect_includes_recursive("${_Inner}" FALSE)
|
||||
endif()
|
||||
endforeach()
|
||||
elseif(NOT _Lib MATCHES "^\\$<" AND TARGET "${_Lib}")
|
||||
_bigfoot_collect_includes_recursive("${_Lib}" FALSE)
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(bigfoot_compile_flatbuffers)
|
||||
set_property(GLOBAL PROPERTY _BIGFOOT_VISITED_TARGETS "")
|
||||
set_property(GLOBAL PROPERTY _BIGFOOT_INCLUDE_DIRS "")
|
||||
_bigfoot_collect_includes_recursive(${PROJECT_NAME} TRUE)
|
||||
|
||||
get_property(_CollectedDirs GLOBAL PROPERTY _BIGFOOT_INCLUDE_DIRS)
|
||||
set(IncludeFolders "${CMAKE_CURRENT_SOURCE_DIR}/Include" ${_CollectedDirs})
|
||||
list(REMOVE_DUPLICATES IncludeFolders)
|
||||
|
||||
set(IncludeFlags "")
|
||||
foreach(folder IN LISTS IncludeFolders)
|
||||
|
||||
Reference in New Issue
Block a user