logic: Added cross-compilation UI to CXX source group setup (issue #370)

Allows for defining specific target triple of architecture, vendor, OS and environment as set of dropdown lists
in CXX source group setup.

bug id = 370
This commit is contained in:
Eberhard Graether
2017-08-08 16:00:32 +02:00
parent 4f74235ca1
commit 2305a74e6c
22 changed files with 611 additions and 64 deletions
+35 -19
View File
@@ -1,6 +1,6 @@
#include "utility/utilityPathDetection.h"
#include <QSysInfo>
#include "utility/logging/logging.h"
#include "utility/path_detector/java_runtime/JavaPathDetectorLinux.h"
#include "utility/path_detector/java_runtime/JavaPathDetectorMac.h"
@@ -17,20 +17,26 @@
#include "utility/path_detector/cxx_header/CxxHeaderPathDetector.h"
#include "utility/path_detector/cxx_header/CxxVsHeaderPathDetector.h"
#include "utility/utilityApp.h"
std::shared_ptr<CombinedPathDetector> utility::getJavaRuntimePathDetector()
{
std::shared_ptr<CombinedPathDetector> combinedDetector = std::make_shared<CombinedPathDetector>();
if (QSysInfo::windowsVersion() != QSysInfo::WV_None)
switch (utility::getOsType())
{
case OS_WINDOWS:
combinedDetector->addDetector(std::make_shared<JavaPathDetectorWindows>("1.8"));
}
else if (QSysInfo::macVersion() != QSysInfo::MV_None)
{
break;
case OS_MAC:
combinedDetector->addDetector(std::make_shared<JavaPathDetectorMac>("1.8"));
}
else
{
break;
case OS_LINUX:
combinedDetector->addDetector(std::make_shared<JavaPathDetectorLinux>("1.8"));
break;
default:
LOG_WARNING("No suitable Java Runtime path detector found");
break;
}
return combinedDetector;
@@ -39,17 +45,21 @@ std::shared_ptr<CombinedPathDetector> utility::getJavaRuntimePathDetector()
std::shared_ptr<CombinedPathDetector> utility::getJreSystemLibraryPathsDetector()
{
std::shared_ptr<CombinedPathDetector> combinedDetector = std::make_shared<CombinedPathDetector>();
if (QSysInfo::windowsVersion() != QSysInfo::WV_None)
switch (utility::getOsType())
{
case OS_WINDOWS:
combinedDetector->addDetector(std::make_shared<JreSystemLibraryPathDetectorWindows>("1.8"));
}
else if (QSysInfo::macVersion() != QSysInfo::MV_None)
{
break;
case OS_MAC:
combinedDetector->addDetector(std::make_shared<JreSystemLibraryPathDetectorMac>("1.8"));
}
else
{
break;
case OS_LINUX:
combinedDetector->addDetector(std::make_shared<JreSystemLibraryPathDetectorLinux>("1.8"));
break;
default:
LOG_WARNING("No suitable JRE system library path detector found");
break;
}
return combinedDetector;
@@ -58,13 +68,19 @@ std::shared_ptr<CombinedPathDetector> utility::getJreSystemLibraryPathsDetector(
std::shared_ptr<CombinedPathDetector> utility::getMavenExecutablePathDetector()
{
std::shared_ptr<CombinedPathDetector> combinedDetector = std::make_shared<CombinedPathDetector>();
if (QSysInfo::windowsVersion() != QSysInfo::WV_None)
switch (utility::getOsType())
{
case OS_WINDOWS:
combinedDetector->addDetector(std::make_shared<MavenPathDetectorWindows>());
}
else
{
break;
case OS_MAC:
case OS_LINUX:
combinedDetector->addDetector(std::make_shared<MavenPathDetectorUnix>());
break;
default:
LOG_WARNING("No suitable Maven path detector found");
break;
}
return combinedDetector;