summaryrefslogtreecommitdiff
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorleha-bot <leha-bot@users.noreply.github.com>2021-08-13 17:05:01 +0300
committerleha-bot <leha-bot@users.noreply.github.com>2021-08-13 21:32:49 +0300
commitd1599c3f7fc7200894c95a47ee41265d9c8b9c2d (patch)
tree86dcff55343e68d0e0de1166f4b04a685be81794 /Source/cmake.cxx
parent74d062969066ecacad8ca3de1c923c253310b26a (diff)
downloadcmake-d1599c3f7fc7200894c95a47ee41265d9c8b9c2d.tar.gz
Fix build on Android (host)
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index ab8309d682..7f8f6547b8 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -114,7 +114,9 @@
# include "cmExtraSublimeTextGenerator.h"
#endif
-#if defined(__linux__) || defined(_WIN32)
+// NOTE: the __linux__ macro is predefined on Android host too, but
+// main CMakeLists.txt filters out this generator by host name.
+#if (defined(__linux__) && !defined(__ANDROID__)) || defined(_WIN32)
# include "cmGlobalGhsMultiGenerator.h"
#endif
@@ -2528,7 +2530,7 @@ void cmake::AddDefaultGenerators()
this->Generators.push_back(cmGlobalMinGWMakefileGenerator::NewFactory());
#endif
#if !defined(CMAKE_BOOTSTRAP)
-# if defined(__linux__) || defined(_WIN32)
+# if (defined(__linux__) && !defined(__ANDROID__)) || defined(_WIN32)
this->Generators.push_back(cmGlobalGhsMultiGenerator::NewFactory());
# endif
this->Generators.push_back(cmGlobalUnixMakefileGenerator3::NewFactory());