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/
|
/buck-out/
|
||||||
/.buckconfig.local
|
/.buckconfig.local
|
||||||
/.buckd
|
/.buckd
|
||||||
/lib/gtest/googletest-*/
|
|
||||||
/gentest/test.html
|
/gentest/test.html
|
||||||
|
|
||||||
# Visual studio code
|
# Visual studio code
|
||||||
|
@@ -4,7 +4,6 @@
|
|||||||
/buck-out/
|
/buck-out/
|
||||||
/.buckconfig.local
|
/.buckconfig.local
|
||||||
/.buckd
|
/.buckd
|
||||||
/lib/gtest/googletest-*/
|
|
||||||
/gentest/test.html
|
/gentest/test.html
|
||||||
|
|
||||||
# Visual studio code
|
# Visual studio code
|
||||||
|
@@ -6,8 +6,6 @@ JUNIT_TARGET = '//lib/junit:junit'
|
|||||||
PROGRUARD_ANNOTATIONS_TARGET = '//java/com/facebook/proguard/annotations:annotations'
|
PROGRUARD_ANNOTATIONS_TARGET = '//java/com/facebook/proguard/annotations:annotations'
|
||||||
SOLOADER_TARGET = '//lib/soloader:soloader'
|
SOLOADER_TARGET = '//lib/soloader:soloader'
|
||||||
GTEST_TARGET = '//lib/gtest:gtest'
|
GTEST_TARGET = '//lib/gtest:gtest'
|
||||||
GTEST_DL_URL = 'https://github.com/google/googletest/archive/release-1.7.0.zip'
|
|
||||||
|
|
||||||
JNI_TARGET = '//lib/jni:jni'
|
JNI_TARGET = '//lib/jni:jni'
|
||||||
FBJNI_TARGET = '//lib/fb:fbjni'
|
FBJNI_TARGET = '//lib/fb:fbjni'
|
||||||
|
|
||||||
|
@@ -7,22 +7,6 @@
|
|||||||
|
|
||||||
include_defs('//CSSLAYOUT_DEFS')
|
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 = [
|
COMPILER_FLAGS = [
|
||||||
'-std=c++11',
|
'-std=c++11',
|
||||||
'-Wno-missing-prototypes',
|
'-Wno-missing-prototypes',
|
||||||
@@ -30,11 +14,11 @@ COMPILER_FLAGS = [
|
|||||||
|
|
||||||
cxx_library(
|
cxx_library(
|
||||||
name = 'gtest',
|
name = 'gtest',
|
||||||
srcs = glob([gtest_folder + '/src/*.cc']),
|
srcs = glob(['googletest/googletest/src/*.cc']),
|
||||||
exported_headers = subdir_glob([
|
exported_headers = subdir_glob([
|
||||||
(gtest_folder + '/include', '**/*.h'),
|
('googletest/googletest/include', '**/*.h'),
|
||||||
(gtest_folder, 'src/*.h'),
|
('googletest/googletest', 'src/*.h'),
|
||||||
(gtest_folder, 'src/*.cc'),
|
('googletest/googletest', 'src/*.cc'),
|
||||||
]),
|
]),
|
||||||
header_namespace = '',
|
header_namespace = '',
|
||||||
compiler_flags = COMPILER_FLAGS,
|
compiler_flags = COMPILER_FLAGS,
|
||||||
|
Reference in New Issue
Block a user