Open cartazio opened 1 year ago
this is what i've hacked together that seems to work, but its from looking at gtests build.bzl
rather than buck examples
cxx_library(
name = 'gtest',
srcs=glob(
include = [
"googletest/src/*.cc",
# "googletest/src/*.h",
# "googletest/include/gtest/**/*.h",
"googlemock/src/*.cc",
# "googlemock/include/gmock/**/*.h",
],
exclude = [
"googletest/src/gtest-all.cc",
"googletest/src/gtest_main.cc",
"googlemock/src/gmock-all.cc",
"googlemock/src/gmock_main.cc",
],
),
header_namespace = '',
exported_headers = glob([
('googletest/googletest/include/gtest/*.h'),
('googletest/googlemock/include/gmock/*.h'),
]),
include_directories= [ ('googletest/include/'),
('googlemock/include/'),
'googletest/']
,
headers = glob([
('googletest/src/*.cc'),
('googletest/src/*.h'),
('googlemock/src/*.cc'),
('googlemock/src/*.h'),
('googletest/include/gtest/*.h'),
('googlemock/include/gmock/*.h'),
('googlemock/include/gmock/internal/*.h'),
('googletest/include/gtest/internal/*.h')
]),
# platform_linker_flags = [
# ('android', []),
# ('', ['-lpthread']),
# ],
visibility = ["PUBLIC"],
# visibility = [
# '//test/...',
# ],
)
Hello, i'm having difficulty setting up the
googletest
dep forcxx_test
commands, is there an example that works out there? The core problem seems to be that the old buck1 example for setting up googletest as a vendored library, requires the subdir_glob() command, which isn't implemented. I do see thatgtest
is definitely referenced by the buck2cxx_test
command