Merge pull request #4466 from danfabo:fix-fetch-content-uses-gtest
PiperOrigin-RevId: 612560830 Change-Id: Ib639603d34258909cf0e0d6fceb297dd8c983d54
This commit is contained in:
		@@ -65,12 +65,13 @@ endif()
 | 
				
			|||||||
config_compiler_and_linker() # from ${gtest_dir}/cmake/internal_utils.cmake
 | 
					config_compiler_and_linker() # from ${gtest_dir}/cmake/internal_utils.cmake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Adds Google Mock's and Google Test's header directories to the search path.
 | 
					# Adds Google Mock's and Google Test's header directories to the search path.
 | 
				
			||||||
 | 
					# Get Google Test's include dirs from the target, gtest_SOURCE_DIR is broken
 | 
				
			||||||
 | 
					# when using fetch-content with the name "GTest".
 | 
				
			||||||
 | 
					get_target_property(gtest_include_dirs gtest INCLUDE_DIRECTORIES)
 | 
				
			||||||
set(gmock_build_include_dirs
 | 
					set(gmock_build_include_dirs
 | 
				
			||||||
  "${gmock_SOURCE_DIR}/include"
 | 
					  "${gmock_SOURCE_DIR}/include"
 | 
				
			||||||
  "${gmock_SOURCE_DIR}"
 | 
					  "${gmock_SOURCE_DIR}"
 | 
				
			||||||
  "${gtest_SOURCE_DIR}/include"
 | 
					  "${gtest_include_dirs}")
 | 
				
			||||||
  # This directory is needed to build directly from Google Test sources.
 | 
					 | 
				
			||||||
  "${gtest_SOURCE_DIR}")
 | 
					 | 
				
			||||||
include_directories(${gmock_build_include_dirs})
 | 
					include_directories(${gmock_build_include_dirs})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
########################################################################
 | 
					########################################################################
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user