Browse Source

Move --enable-tests out of Python configure and flip the default.

pull/1/head
wolfbeast 4 years ago committed by Roy Tam
parent
commit
8ffcc15d3f
  1. 1
      build/moz.configure/old.configure
  2. 10
      js/src/old-configure.in
  3. 32
      moz.configure
  4. 29
      old-configure.in

1
build/moz.configure/old.configure vendored

@ -236,6 +236,7 @@ def old_configure_options(*options):
'--enable-system-pixman',
'--enable-system-sqlite',
'--enable-tasktracer',
'--enable-tests',
'--enable-thread-sanitizer',
'--enable-trace-logging',
'--enable-ui-locale',

10
js/src/old-configure.in

@ -1539,6 +1539,14 @@ MOZ_ARG_ENABLE_STRING(ui-locale,
MOZ_UI_LOCALE=$enableval )
AC_SUBST(MOZ_UI_LOCALE)
dnl ========================================================
dnl Build the tests?
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(tests,
[ --enable-tests Build test libraries & programs],
ENABLE_TESTS=1,
ENABLE_TESTS= )
dnl ========================================================
dnl =
dnl = Module specific options
@ -2097,6 +2105,8 @@ AC_SUBST(MOZ_DEBUG_LDFLAGS)
AC_SUBST(WARNINGS_AS_ERRORS)
AC_SUBST(LIBICONV)
AC_SUBST(ENABLE_TESTS)
AC_SUBST(ENABLE_STRIP)
AC_SUBST(PKG_SKIP_STRIP)
AC_SUBST(INCREMENTAL_LINKER)

32
moz.configure vendored

@ -52,38 +52,6 @@ def compile_environment(compile_env):
set_config('COMPILE_ENVIRONMENT', compile_environment)
add_old_configure_assignment('COMPILE_ENVIRONMENT', compile_environment)
js_option('--disable-tests',
help='Do not build test libraries & programs')
@depends('--disable-tests')
def enable_tests(value):
if value:
return True
set_config('ENABLE_TESTS', enable_tests)
set_define('ENABLE_TESTS', enable_tests)
@depends(enable_tests)
def gtest_has_rtti(value):
if value:
return '0'
set_define('GTEST_HAS_RTTI', gtest_has_rtti)
@depends(target, enable_tests)
def linux_gtest_defines(target, enable_tests):
if enable_tests and target.os == 'Android':
return namespace(os_linux_android=True,
use_own_tr1_tuple=True,
has_clone='0')
set_define('GTEST_OS_LINUX_ANDROID',
delayed_getattr(linux_gtest_defines, 'os_linux_android'))
set_define('GTEST_USE_OWN_TR1_TUPLE',
delayed_getattr(linux_gtest_defines, 'use_own_tr1_tuple'))
set_define('GTEST_HAS_CLONE',
delayed_getattr(linux_gtest_defines, 'has_clone'))
js_option('--enable-debug',
nargs='?',
help='Enable building with developer debug info '

29
old-configure.in

@ -2261,6 +2261,7 @@ dnl ========================================================
MOZ_ARG_HEADER(Application)
ENABLE_TESTS=
ENABLE_SYSTEM_EXTENSION_DIRS=1
MOZ_BRANDING_DIRECTORY=
MOZ_OFFICIAL_BRANDING=
@ -3876,6 +3877,32 @@ if test -n "$MOZ_UPDATER"; then
AC_DEFINE(MOZ_UPDATER)
fi
dnl ========================================================
dnl Build the tests?
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(tests,
[ --enable-tests Build test libraries & programs],
ENABLE_TESTS=1,
ENABLE_TESTS= )
if test -n "$ENABLE_TESTS"; then
GTEST_HAS_RTTI=0
AC_DEFINE(ENABLE_TESTS)
AC_DEFINE_UNQUOTED(GTEST_HAS_RTTI, 0)
AC_SUBST(GTEST_HAS_RTTI)
if test -n "$_WIN32_MSVC"; then
AC_DEFINE_UNQUOTED(_VARIADIC_MAX, 10)
fi
if test "${OS_TARGET}" = "Android"; then
AC_DEFINE(GTEST_OS_LINUX_ANDROID)
AC_DEFINE(GTEST_USE_OWN_TR1_TUPLE)
AC_DEFINE_UNQUOTED(GTEST_HAS_CLONE, 0)
AC_SUBST(GTEST_OS_LINUX_ANDROID)
AC_SUBST(GTEST_USE_OWN_TR1_TUPLE)
AC_SUBST(GTEST_HAS_CLONE)
fi
fi
dnl ========================================================
dnl parental controls (for Windows Vista)
dnl ========================================================
@ -5328,6 +5355,8 @@ AC_SUBST(LIBICONV)
AC_SUBST(MOZ_TOOLKIT_SEARCH)
AC_SUBST(MOZ_FEEDS)
AC_SUBST(ENABLE_TESTS)
AC_SUBST(MOZ_UNIVERSALCHARDET)
AC_SUBST(ACCESSIBILITY)
AC_SUBST(MOZ_SPELLCHECK)

Loading…
Cancel
Save