From 154ff652aaedc970a678cafc8b65ced8a1c767fd Mon Sep 17 00:00:00 2001 From: klugier Date: Sat, 10 Oct 2020 21:01:28 +0000 Subject: [PATCH] Ide: Limit number of Android c++ runtimes to the current NDK state. git-svn-id: svn://ultimatepp.org/upp/trunk@15229 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Android/AndroidNDK.cpp | 38 ++++--------------------------- uppsrc/ide/Methods.cpp | 3 ++- 2 files changed, 6 insertions(+), 35 deletions(-) diff --git a/uppsrc/ide/Android/AndroidNDK.cpp b/uppsrc/ide/Android/AndroidNDK.cpp index 068829fbd..92b7a9b79 100644 --- a/uppsrc/ide/Android/AndroidNDK.cpp +++ b/uppsrc/ide/Android/AndroidNDK.cpp @@ -99,16 +99,11 @@ Vector AndroidNDK::FindCppRuntimes() const { Vector runtimes; - // Values from ndk documentation - runtimes.Add("system"); - runtimes.Add("gabi++_static"); - runtimes.Add("gabi++_shared"); - runtimes.Add("stlport_static"); - runtimes.Add("stlport_shared"); - runtimes.Add("gnustl_static"); - runtimes.Add("gnustl_shared"); + // Values from NDK documentation runtimes.Add("c++_static"); runtimes.Add("c++_shared"); + runtimes.Add("system"); + runtimes.Add("none"); return runtimes; } @@ -127,33 +122,8 @@ String AndroidNDK::GetIncludeDir() const String AndroidNDK::GetCppIncludeDir(const String& cppRuntime) const { String nest = GetSourcesDir() + DIR_SEPS + "cxx-stl" + DIR_SEPS; - if(cppRuntime == "system") + if(cppRuntime == "system") { return nest + "system" + DIR_SEPS + "include"; - else - if(cppRuntime.StartsWith("gabi++")) - return nest + "gabi++" + DIR_SEPS + "include"; - else - if(cppRuntime.StartsWith("stlport")) - return nest + "stlport" + DIR_SEPS + "stlport"; - else - if(cppRuntime.StartsWith("gnustl")) { - // TODO: implement selection of library version - String versionsDir = nest + "gnu-libstdc++"; - - FindFile ff(nest + "gnu-libstdc++" + DIR_SEPS + "*.*"); - String inc; - double ver = 0; - while(ff) { - if(ff.IsFolder()) { - double h = atof(ff.GetName()); - if(h > ver) { - ver = h; - inc = ff.GetPath(); - } - } - ff.Next(); - } - return inc + DIR_SEPS + "include"; } else if(cppRuntime.StartsWith("c++")) { diff --git a/uppsrc/ide/Methods.cpp b/uppsrc/ide/Methods.cpp index 7bcdbfcff..7b93e2a75 100644 --- a/uppsrc/ide/Methods.cpp +++ b/uppsrc/ide/Methods.cpp @@ -864,8 +864,9 @@ String Ide::GetIncludePath() MergeWith(include, ";", ndk.GetIncludeDir()); String cppIncludeDir = ndk.GetCppIncludeDir(bm.Get("NDK_CPP_RUNTIME", "")); - if(!cppIncludeDir.IsEmpty()) + if(!cppIncludeDir.IsEmpty()) { MergeWith(include, ";", cppIncludeDir); + } } }