summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-09-09 13:07:26 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2021-09-17 17:30:14 +0200
commit7a4b586f4b8d1b73d1af3d24ff5112e4dc231ea6 (patch)
treefddc569efaeeb8147b80c0d7c3aae60f5c623fd7 /util
parentd8fd2425fb37b5f745e385552b11dc4cdcffb5ff (diff)
Remove conditioning on Android embedded
It is no longer handled separately from Android. This effectively reverts commit 6d50f746fe05a7008b63818e77784dd0c99270a1 Change-Id: Ic2d75b8c5a09895810913311ab2fe3355d4d2983 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'util')
-rw-r--r--util/cmake/condition_simplifier.py6
-rw-r--r--util/cmake/helper.py3
-rw-r--r--util/cmake/tests/data/standardpaths.pro2
-rwxr-xr-xutil/cmake/tests/test_logic_mapping.py3
-rwxr-xr-xutil/cmake/tests/test_parsing.py2
-rwxr-xr-xutil/cmake/tests/test_scope_handling.py16
6 files changed, 14 insertions, 18 deletions
diff --git a/util/cmake/condition_simplifier.py b/util/cmake/condition_simplifier.py
index e8fc0e40d2..ecef86af6a 100644
--- a/util/cmake/condition_simplifier.py
+++ b/util/cmake/condition_simplifier.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
#############################################################################
##
-## Copyright (C) 2019 The Qt Company Ltd.
+## Copyright (C) 2021 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the plugins of the Qt Toolkit.
@@ -108,7 +108,7 @@ def _recursive_simplify(expr):
# windowses = ('WIN32', 'WINRT')
apples = ("MACOS", "UIKIT", "IOS", "TVOS", "WATCHOS")
bsds = ("FREEBSD", "OPENBSD", "NETBSD")
- androids = ("ANDROID", "ANDROID_EMBEDDED")
+ androids = ("ANDROID",)
unixes = (
"APPLE",
*apples,
@@ -140,7 +140,7 @@ def _recursive_simplify(expr):
expr = _simplify_flavors_in_condition("APPLE", apples, expr)
expr = _simplify_flavors_in_condition("BSD", bsds, expr)
expr = _simplify_flavors_in_condition("UNIX", unixes, expr)
- expr = _simplify_flavors_in_condition("ANDROID", ("ANDROID_EMBEDDED",), expr)
+ expr = _simplify_flavors_in_condition("ANDROID", (), expr)
# Simplify families of OSes against other families:
expr = _simplify_os_families(expr, ("WIN32", "WINRT"), unixes)
diff --git a/util/cmake/helper.py b/util/cmake/helper.py
index 34479b4626..6de3b44593 100644
--- a/util/cmake/helper.py
+++ b/util/cmake/helper.py
@@ -1,6 +1,6 @@
#############################################################################
##
-## Copyright (C) 2018 The Qt Company Ltd.
+## Copyright (C) 2021 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the plugins of the Qt Toolkit.
@@ -761,7 +761,6 @@ platform_mapping = {
"hpux": "HPUX",
"nacl": "NACL",
"android": "ANDROID",
- "android-embedded": "ANDROID_EMBEDDED",
"uikit": "UIKIT",
"tvos": "TVOS",
"watchos": "WATCHOS",
diff --git a/util/cmake/tests/data/standardpaths.pro b/util/cmake/tests/data/standardpaths.pro
index 4b45788e4f..b9896b8e29 100644
--- a/util/cmake/tests/data/standardpaths.pro
+++ b/util/cmake/tests/data/standardpaths.pro
@@ -7,7 +7,7 @@ win32 {
} else:unix {
mac {
OBJECTIVE_SOURCES += io/qstandardpaths_mac.mm
- } else:android:!android-embedded {
+ } else:android {
SOURCES += io/qstandardpaths_android.cpp
} else:haiku {
SOURCES += io/qstandardpaths_haiku.cpp
diff --git a/util/cmake/tests/test_logic_mapping.py b/util/cmake/tests/test_logic_mapping.py
index 6e4fd20590..b885b47707 100755
--- a/util/cmake/tests/test_logic_mapping.py
+++ b/util/cmake/tests/test_logic_mapping.py
@@ -182,5 +182,4 @@ def test_simplify_complex_false():
def test_simplify_android_not_apple():
- validate_simplify('ANDROID AND NOT ANDROID_EMBEDDED AND NOT MACOS',
- 'ANDROID AND NOT ANDROID_EMBEDDED')
+ validate_simplify('ANDROID AND NOT MACOS', 'ANDROID')
diff --git a/util/cmake/tests/test_parsing.py b/util/cmake/tests/test_parsing.py
index 9acee46007..898900674b 100755
--- a/util/cmake/tests/test_parsing.py
+++ b/util/cmake/tests/test_parsing.py
@@ -239,7 +239,7 @@ def test_realworld_standardpaths():
# android / else:
(cond4, if_branch4, else_branch4) = evaluate_condition(else_branch3[0])
- assert cond4 == 'android && !android-embedded'
+ assert cond4 == 'android'
assert len(if_branch4) == 1
validate_op('SOURCES', '+=', ['io/qstandardpaths_android.cpp'], if_branch4[0])
assert len(else_branch4) == 1
diff --git a/util/cmake/tests/test_scope_handling.py b/util/cmake/tests/test_scope_handling.py
index 51e569fb09..996c247cfb 100755
--- a/util/cmake/tests/test_scope_handling.py
+++ b/util/cmake/tests/test_scope_handling.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
#############################################################################
##
-## Copyright (C) 2018 The Qt Company Ltd.
+## Copyright (C) 2021 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the plugins of the Qt Toolkit.
@@ -306,12 +306,10 @@ def test_qstandardpaths_scopes():
# mac {
# OBJECTIVE_SOURCES += io/qstandardpaths_mac.mm
scope7 = _new_scope(parent_scope=scope6, condition='MACOS', SOURCES='qsp_mac.mm')
- # } else:android:!android-embedded {
+ # } else:android {
# SOURCES += io/qstandardpaths_android.cpp
scope8 = _new_scope(parent_scope=scope6, condition='else')
- scope9 = _new_scope(parent_scope=scope8,
- condition='ANDROID AND NOT ANDROID_EMBEDDED',
- SOURCES='qsp_android.cpp')
+ scope9 = _new_scope(parent_scope=scope8, condition='ANDROID', SOURCES='qsp_android.cpp')
# } else:haiku {
# SOURCES += io/qstandardpaths_haiku.cpp
scope10 = _new_scope(parent_scope=scope8, condition='else')
@@ -332,10 +330,10 @@ def test_qstandardpaths_scopes():
assert scope6.total_condition == 'UNIX'
assert scope7.total_condition == 'MACOS'
assert scope8.total_condition == 'UNIX AND NOT MACOS'
- assert scope9.total_condition == 'ANDROID AND NOT ANDROID_EMBEDDED'
- assert scope10.total_condition == 'UNIX AND NOT MACOS AND (ANDROID_EMBEDDED OR NOT ANDROID)'
- assert scope11.total_condition == 'HAIKU AND (ANDROID_EMBEDDED OR NOT ANDROID)'
- assert scope12.total_condition == 'UNIX AND NOT MACOS AND NOT HAIKU AND (ANDROID_EMBEDDED OR NOT ANDROID)'
+ assert scope9.total_condition == 'ANDROID'
+ assert scope10.total_condition == 'UNIX AND NOT MACOS AND NOT ANDROID'
+ assert scope11.total_condition == 'HAIKU AND NOT ANDROID'
+ assert scope12.total_condition == 'UNIX AND NOT MACOS AND NOT HAIKU AND NOT ANDROID'
def test_recursive_expansion():
scope = _new_scope(A='Foo',B='$$A/Bar')