Make gtest a submodule in open source
Summary: Remove infra for dynamically downloading gtest as this fails like 50% of the time on travis. I'll manually push gtest as a submodule instead. Reviewed By: gkassabli Differential Revision: D4183033 fbshipit-source-id: 09a121b8ede7a5974a29b6692edc63bff79aece7
This commit is contained in:
committed by
Facebook Github Bot
parent
2fa6f5087d
commit
32ba5ae647
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,7 +4,6 @@
|
||||
/buck-out/
|
||||
/.buckconfig.local
|
||||
/.buckd
|
||||
/lib/gtest/googletest-*/
|
||||
/gentest/test.html
|
||||
|
||||
# Visual studio code
|
||||
|
@@ -4,8 +4,7 @@
|
||||
/buck-out/
|
||||
/.buckconfig.local
|
||||
/.buckd
|
||||
/lib/gtest/googletest-*/
|
||||
/gentest/test.html
|
||||
|
||||
# Visual studio code
|
||||
.vscode
|
||||
.vscode
|
||||
|
@@ -6,8 +6,6 @@ JUNIT_TARGET = '//lib/junit:junit'
|
||||
PROGRUARD_ANNOTATIONS_TARGET = '//java/com/facebook/proguard/annotations:annotations'
|
||||
SOLOADER_TARGET = '//lib/soloader:soloader'
|
||||
GTEST_TARGET = '//lib/gtest:gtest'
|
||||
GTEST_DL_URL = 'https://github.com/google/googletest/archive/release-1.7.0.zip'
|
||||
|
||||
JNI_TARGET = '//lib/jni:jni'
|
||||
FBJNI_TARGET = '//lib/fb:fbjni'
|
||||
|
||||
|
@@ -7,22 +7,6 @@
|
||||
|
||||
include_defs('//CSSLAYOUT_DEFS')
|
||||
|
||||
with allow_unsafe_import():
|
||||
import os
|
||||
import urllib2
|
||||
import zipfile
|
||||
|
||||
# Download gtest dep if it does not exists in path
|
||||
current_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
gtest_folder = 'googletest-release-1.7.0'
|
||||
if GTEST_DL_URL != None and not os.path.isdir(current_dir + gtest_folder):
|
||||
gtest = urllib2.urlopen('https://github.com/google/googletest/archive/release-1.7.0.zip').read()
|
||||
with open("gtest.zip", 'w') as f:
|
||||
f.write(gtest)
|
||||
with zipfile.ZipFile('gtest.zip',"r") as zip:
|
||||
zip.extractall(os.path.dirname(os.path.realpath(__file__)))
|
||||
os.remove('gtest.zip')
|
||||
|
||||
COMPILER_FLAGS = [
|
||||
'-std=c++11',
|
||||
'-Wno-missing-prototypes',
|
||||
@@ -30,11 +14,11 @@ COMPILER_FLAGS = [
|
||||
|
||||
cxx_library(
|
||||
name = 'gtest',
|
||||
srcs = glob([gtest_folder + '/src/*.cc']),
|
||||
srcs = glob(['googletest/googletest/src/*.cc']),
|
||||
exported_headers = subdir_glob([
|
||||
(gtest_folder + '/include', '**/*.h'),
|
||||
(gtest_folder, 'src/*.h'),
|
||||
(gtest_folder, 'src/*.cc'),
|
||||
('googletest/googletest/include', '**/*.h'),
|
||||
('googletest/googletest', 'src/*.h'),
|
||||
('googletest/googletest', 'src/*.cc'),
|
||||
]),
|
||||
header_namespace = '',
|
||||
compiler_flags = COMPILER_FLAGS,
|
||||
|
Reference in New Issue
Block a user