Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions FindGmockGlobal.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include("GenericFindDependency")
GenericFindDependency(
TARGET gmock-global
SOURCE_DIR "gmock-global"
SYSTEM_INCLUDES
)
1 change: 1 addition & 0 deletions FindGoogletest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ GenericFindDependency(
SOURCE_DIR "googletest"
SYSTEM_INCLUDES
)
mark_target_as_system_includes(gmock)
10 changes: 5 additions & 5 deletions GenericFindDependency.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,12 @@ endmacro()
#
# Should only be called from GenericFindDependency
#
function(mark_target_as_system_includes TARGET)
get_target_property(directories ${x_TARGET} INTERFACE_INCLUDE_DIRECTORIES)
function(mark_target_as_system_includes TGT)
get_target_property(directories ${TGT} INTERFACE_INCLUDE_DIRECTORIES)
if(directories)
message(STATUS "Marking ${x_TARGET} include directories as system")
set_target_properties(${x_TARGET} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "")
target_include_directories(${x_TARGET} SYSTEM INTERFACE "${directories}")
message(STATUS "Marking ${TGT} include directories as system")
set_target_properties(${TGT} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "")
target_include_directories(${TGT} SYSTEM INTERFACE "${directories}")
endif()
endfunction()

Expand Down
2 changes: 2 additions & 0 deletions SwiftCmakeOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ function(verify_test_dependencies)
set(found TRUE)
elseif(${P} STREQUAL "Benchmark" AND TARGET benchmark)
set(found TRUE)
elseif(${P} STREQUAL "GmockGlobal" AND TARGET gmock-global)
set(found TRUE)
endif()
if(NOT found)
message(WARNING "Disable tests because dependency ${P} was not found")
Expand Down