logic: implemented global header search path detection for VS 2017

* split header search path detector for VS into 2 different classes (one for VS2010 - VS2015 and one for VS2017)
* implemented detecting "ucrt" path for windows global headers
This commit is contained in:
mlangkabel
2017-10-12 18:04:23 +02:00
parent af626143a5
commit 451ad785de
13 changed files with 365 additions and 194 deletions
+23 -6
View File
@@ -207,20 +207,37 @@ void FileSystem::createDirectory(const FilePath& path)
boost::filesystem::create_directories(path.str());
}
std::vector<FilePath> FileSystem::getSubDirectories(const FilePath &path)
std::vector<FilePath> FileSystem::getDirectSubDirectories(const FilePath& path)
{
std::vector<FilePath> v;
if (!path.exists() || !path.isDirectory())
if (path.exists() && path.isDirectory())
{
return v;
for (boost::filesystem::directory_iterator end, dir(path.str()); dir != end; dir++)
{
if (boost::filesystem::is_directory(dir->path()))
{
v.push_back(FilePath(dir->path()));
}
}
}
for (boost::filesystem::recursive_directory_iterator end, dir(path.str()); dir != end; dir++)
return v;
}
std::vector<FilePath> FileSystem::getRecursiveSubDirectories(const FilePath &path)
{
std::vector<FilePath> v;
if (path.exists() && path.isDirectory())
{
if (boost::filesystem::is_directory(dir->path()))
for (boost::filesystem::recursive_directory_iterator end, dir(path.str()); dir != end; dir++)
{
v.push_back(FilePath(dir->path()));
if (boost::filesystem::is_directory(dir->path()))
{
v.push_back(FilePath(dir->path()));
}
}
}
+2 -1
View File
@@ -31,7 +31,8 @@ public:
static bool copy_directory(const FilePath& from, const FilePath& to);
static void createDirectory(const FilePath& path);
static std::vector<FilePath> getSubDirectories(const FilePath& path);
static std::vector<FilePath> getDirectSubDirectories(const FilePath& path);
static std::vector<FilePath> getRecursiveSubDirectories(const FilePath& path);
static std::string fileName(const std::string& path);
static std::string absoluteFilePath(const std::string& path);
+4 -2
View File
@@ -239,8 +239,10 @@ add_files(
utility/path_detector/cxx_header/CxxFrameworkPathDetector.h
utility/path_detector/cxx_header/CxxHeaderPathDetector.cpp
utility/path_detector/cxx_header/CxxHeaderPathDetector.h
utility/path_detector/cxx_header/CxxVsHeaderPathDetector.cpp
utility/path_detector/cxx_header/CxxVsHeaderPathDetector.h
utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.cpp
utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.h
utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.cpp
utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.h
utility/path_detector/cxx_header/utilityCxxHeaderDetection.cpp
utility/path_detector/cxx_header/utilityCxxHeaderDetection.h
@@ -0,0 +1,108 @@
#include "utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.h"
#include <string>
#include <QSettings>
#include <QSysInfo>
#include "utility/file/FilePath.h"
#include "utility/path_detector/cxx_header/utilityCxxHeaderDetection.h"
#include "utility/utility.h"
CxxVs10To14HeaderPathDetector::CxxVs10To14HeaderPathDetector(VisualStudioType type, bool isExpress, ApplicationArchitectureType architecture)
: PathDetector(visualStudioTypeToString(type) + (isExpress ? " Express" : "") + (architecture == APPLICATION_ARCHITECTURE_X86_64 ? " 64 Bit" : ""))
, m_version(visualStudioTypeToVersion(type))
, m_isExpress(isExpress)
, m_architecture(architecture)
{
}
CxxVs10To14HeaderPathDetector::~CxxVs10To14HeaderPathDetector()
{
}
std::vector<FilePath> CxxVs10To14HeaderPathDetector::getPaths() const
{
FilePath vsInstallPath = getVsInstallPathUsingRegistry();
// vc++ headers
std::vector<FilePath> headerSearchPaths;
if (vsInstallPath.exists())
{
std::vector<std::string> subdirectories;
subdirectories.push_back("vc/include");
subdirectories.push_back("vc/atlmfc/include");
for (size_t i = 0; i < subdirectories.size(); i++)
{
FilePath headerSearchPath = vsInstallPath.concat(FilePath(subdirectories[i]));
if (headerSearchPath.exists())
{
headerSearchPaths.push_back(headerSearchPath.canonical());
}
}
}
if (!headerSearchPaths.empty())
{
utility::append(headerSearchPaths, utility::getWindowsSdkHeaderSearchPaths(m_architecture));
}
return headerSearchPaths;
}
int CxxVs10To14HeaderPathDetector::visualStudioTypeToVersion(const VisualStudioType t)
{
switch (t)
{
case VISUAL_STUDIO_2010:
return 10;
case VISUAL_STUDIO_2012:
return 11;
case VISUAL_STUDIO_2013:
return 12;
case VISUAL_STUDIO_2015:
return 14;
}
return 0;
}
std::string CxxVs10To14HeaderPathDetector::visualStudioTypeToString(const VisualStudioType t)
{
std::string ret = "Visual Studio";
switch (t)
{
case VISUAL_STUDIO_2010:
ret += " 2010";
case VISUAL_STUDIO_2012:
ret += " 2012";
case VISUAL_STUDIO_2013:
ret += " 2013";
case VISUAL_STUDIO_2015:
ret += " 2015";
}
return ret;
}
FilePath CxxVs10To14HeaderPathDetector::getVsInstallPathUsingRegistry() const
{
QString key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\";
if (m_architecture == APPLICATION_ARCHITECTURE_X86_32)
{
key += "Wow6432Node\\";
}
key += "Microsoft\\";
key += (m_isExpress ? "VCExpress" : "VisualStudio");
key += "\\" + QString::number(m_version) + ".0";
QSettings expressKey(key, QSettings::NativeFormat); // NativeFormat means from Registry on Windows.
QString value = expressKey.value("InstallDir").toString() + "../../";
FilePath path(value.toStdString());
if (path.exists())
{
return path;
}
return FilePath();
}
@@ -0,0 +1,34 @@
#ifndef CXX_VS_10_TO_14_HEADER_PATH_DETECTOR_H
#define CXX_VS_10_TO_14_HEADER_PATH_DETECTOR_H
#include "utility/path_detector/PathDetector.h"
#include "utility/ApplicationArchitectureType.h"
class CxxVs10To14HeaderPathDetector : public PathDetector
{
public:
enum VisualStudioType
{
VISUAL_STUDIO_2010,
VISUAL_STUDIO_2012,
VISUAL_STUDIO_2013,
VISUAL_STUDIO_2015
};
CxxVs10To14HeaderPathDetector(VisualStudioType type, bool isExpress, ApplicationArchitectureType architecture);
virtual ~CxxVs10To14HeaderPathDetector();
virtual std::vector<FilePath> getPaths() const;
private:
static int visualStudioTypeToVersion(const VisualStudioType t);
static std::string visualStudioTypeToString(const VisualStudioType t);
FilePath getVsInstallPathUsingRegistry() const;
const int m_version;
const bool m_isExpress;
const ApplicationArchitectureType m_architecture;
};
#endif // CXX_VS_10_TO_14_HEADER_PATH_DETECTOR_H
@@ -0,0 +1,60 @@
#include "utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.h"
#include <string>
#include "utility/file/FilePath.h"
#include "utility/file/FileSystem.h"
#include "utility/path_detector/cxx_header/utilityCxxHeaderDetection.h"
#include "utility/utilityApp.h"
#include "utility/utility.h"
CxxVs15HeaderPathDetector::CxxVs15HeaderPathDetector()
: PathDetector("Visual Studio 2017")
{
}
CxxVs15HeaderPathDetector::~CxxVs15HeaderPathDetector()
{
}
std::vector<FilePath> CxxVs15HeaderPathDetector::getPaths() const
{
std::vector<FilePath> headerSearchPaths;
{
const std::vector<FilePath> expandedPaths = FilePath("%ProgramFiles(x86)%/Microsoft Visual Studio/Installer/vswhere.exe").expandEnvironmentVariables();
if (!expandedPaths.empty())
{
const std::string command = "\"" + expandedPaths[0].str() + "\" -latest -property installationPath";
const std::string command2 = "\"C:/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe\"";
const std::string output = utility::executeProcess(command, "", 10000);
const FilePath vsInstallPath(output);
if (vsInstallPath.exists())
{
for (const FilePath& versionPath : FileSystem::getDirectSubDirectories(vsInstallPath.concat(FilePath("VC/Tools/MSVC"))))
{
if (versionPath.exists())
{
headerSearchPaths.push_back(versionPath.concat(FilePath("include")));
headerSearchPaths.push_back(versionPath.concat(FilePath("atlmfc/include")));
}
}
headerSearchPaths.push_back(vsInstallPath.concat(FilePath("VC/Auxiliary/VS/include")));
headerSearchPaths.push_back(vsInstallPath.concat(FilePath("VC/Auxiliary/VS/UnitTest/include")));
}
}
}
if (!headerSearchPaths.empty())
{
std::vector<FilePath> windowsSdkHeaderSearchPaths = utility::getWindowsSdkHeaderSearchPaths(APPLICATION_ARCHITECTURE_X86_32);
if (windowsSdkHeaderSearchPaths.empty())
{
windowsSdkHeaderSearchPaths = utility::getWindowsSdkHeaderSearchPaths(APPLICATION_ARCHITECTURE_X86_64);
}
utility::append(headerSearchPaths, windowsSdkHeaderSearchPaths);
}
return headerSearchPaths;
}
@@ -0,0 +1,16 @@
#ifndef CXX_VS_15_HEADER_PATH_DETECTOR_H
#define CXX_VS_15_HEADER_PATH_DETECTOR_H
#include "utility/path_detector/PathDetector.h"
#include "utility/ApplicationArchitectureType.h"
class CxxVs15HeaderPathDetector: public PathDetector
{
public:
CxxVs15HeaderPathDetector();
virtual ~CxxVs15HeaderPathDetector();
virtual std::vector<FilePath> getPaths() const;
};
#endif // CXX_VS_15_HEADER_PATH_DETECTOR_H
@@ -1,126 +0,0 @@
#include "utility/path_detector/cxx_header/CxxVsHeaderPathDetector.h"
#include <string>
#include <QSettings>
#include <QSysInfo>
#include "utility/file/FilePath.h"
CxxVsHeaderPathDetector::CxxVsHeaderPathDetector(int version, bool isExpress, ApplicationArchitectureType architecture)
: PathDetector("Visual Studio " + std::to_string(version) + (isExpress ? " Express" : "") + (architecture == APPLICATION_ARCHITECTURE_X86_64 ? " 64 Bit" : ""))
, m_version(version)
, m_isExpress(isExpress)
, m_architecture(architecture)
{
}
CxxVsHeaderPathDetector::~CxxVsHeaderPathDetector()
{
}
std::vector<FilePath> CxxVsHeaderPathDetector::getPaths() const
{
FilePath vsInstallPath = getVsInstallPathUsingRegistry();
// vc++ headers
std::vector<FilePath> headerPaths;
if (vsInstallPath.exists())
{
std::vector<std::string> subdirectories;
subdirectories.push_back("vc/include");
subdirectories.push_back("vc/atlmfc/include");
for (size_t i = 0; i < subdirectories.size(); i++)
{
FilePath headerSearchPath = vsInstallPath.concat(FilePath(subdirectories[i]));
if (headerSearchPath.exists())
{
headerPaths.push_back(headerSearchPath.canonical());
}
}
}
if (headerPaths.size() > 0)
{
//windows sdk
std::vector<std::string> windowsSdkVersions;
windowsSdkVersions.push_back("v8.1A");
windowsSdkVersions.push_back("v8.0A");
windowsSdkVersions.push_back("v7.1A");
windowsSdkVersions.push_back("v7.0A");
for (size_t i = 0; i < windowsSdkVersions.size(); i++)
{
FilePath sdkPath = getWindowsSdkPathUsingRegistry(windowsSdkVersions[i]);
if (sdkPath.exists())
{
FilePath sdkIncludePath = sdkPath.concat(FilePath("include/"));
if (sdkIncludePath.exists())
{
std::vector<std::string> subdirectories;
subdirectories.push_back("shared");
subdirectories.push_back("um");
subdirectories.push_back("winrt");
bool usingSubdirectories = false;
for (size_t j = 0; j < subdirectories.size(); j++)
{
FilePath sdkSubdirectory = sdkPath.concat(FilePath(subdirectories[j]));
if (sdkSubdirectory.exists())
{
headerPaths.push_back(sdkSubdirectory);
usingSubdirectories = true;
}
}
if (!usingSubdirectories)
{
headerPaths.push_back(sdkIncludePath);
}
break;
}
}
}
}
return headerPaths;
}
FilePath CxxVsHeaderPathDetector::getVsInstallPathUsingRegistry() const
{
QString key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\";
if (m_architecture == APPLICATION_ARCHITECTURE_X86_32)
{
key += "Wow6432Node\\";
}
key += "Microsoft\\";
key += (m_isExpress ? "VCExpress" : "VisualStudio");
key += "\\" + QString::number(m_version) + ".0";
QSettings expressKey(key, QSettings::NativeFormat); // NativeFormat means from Registry on Windows.
QString value = expressKey.value("InstallDir").toString() + "../../";
FilePath path(value.toStdString());
if (path.exists())
{
return path;
}
return FilePath();
}
FilePath CxxVsHeaderPathDetector::getWindowsSdkPathUsingRegistry(const std::string& version) const
{
QString key(("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\" + version).c_str());
QSettings expressKey(key, QSettings::NativeFormat); // NativeFormat means from Registry on Windows.
QString value = expressKey.value("InstallationFolder").toString();
FilePath path(value.toStdString());
if (path.exists())
{
return path;
}
return FilePath();
}
@@ -1,24 +0,0 @@
#ifndef CXX_VS_HEADER_PATH_DETECTOR_H
#define CXX_VS_HEADER_PATH_DETECTOR_H
#include "utility/path_detector/PathDetector.h"
#include "utility/ApplicationArchitectureType.h"
class CxxVsHeaderPathDetector: public PathDetector
{
public:
CxxVsHeaderPathDetector(int version, bool isExpress, ApplicationArchitectureType architecture);
virtual ~CxxVsHeaderPathDetector();
virtual std::vector<FilePath> getPaths() const;
private:
FilePath getVsInstallPathUsingRegistry() const;
FilePath getWindowsSdkPathUsingRegistry(const std::string& version) const;
const int m_version;
const bool m_isExpress;
const ApplicationArchitectureType m_architecture;
};
#endif // CXX_VS_HEADER_PATH_DETECTOR_H
@@ -1,5 +1,9 @@
#include "utility/path_detector/cxx_header/utilityCxxHeaderDetection.h"
#include <QSettings>
#include <QSysInfo>
#include "utility/file/FileSystem.h"
#include "utility/utilityApp.h"
#include "utility/utilityString.h"
@@ -23,4 +27,87 @@ namespace utility
return paths;
}
std::vector<FilePath> getWindowsSdkHeaderSearchPaths(ApplicationArchitectureType architectureType)
{
std::vector<FilePath> headerSearchPaths;
std::vector<std::string> windowsSdkVersions;
windowsSdkVersions.push_back("v8.1A");
windowsSdkVersions.push_back("v8.1");
windowsSdkVersions.push_back("v8.0A");
windowsSdkVersions.push_back("v7.1A");
windowsSdkVersions.push_back("v7.0A");
for (size_t i = 0; i < windowsSdkVersions.size(); i++)
{
FilePath sdkPath = getWindowsSdkRootPathUsingRegistry(architectureType, windowsSdkVersions[i]);
if (sdkPath.exists())
{
FilePath sdkIncludePath = sdkPath.concat(FilePath("include/"));
if (sdkIncludePath.exists())
{
std::vector<std::string> subdirectories;
subdirectories.push_back("shared");
subdirectories.push_back("um");
subdirectories.push_back("winrt");
bool usingSubdirectories = false;
for (size_t j = 0; j < subdirectories.size(); j++)
{
FilePath sdkSubdirectory = sdkIncludePath.concat(FilePath(subdirectories[j]));
if (sdkSubdirectory.exists())
{
headerSearchPaths.push_back(sdkSubdirectory);
usingSubdirectories = true;
}
}
if (!usingSubdirectories)
{
headerSearchPaths.push_back(sdkIncludePath);
}
break;
}
}
}
{
FilePath sdkPath = getWindowsSdkRootPathUsingRegistry(architectureType, "v10.0");
if (sdkPath.exists())
{
for (const FilePath& versionPath : FileSystem::getDirectSubDirectories(sdkPath.concat(FilePath("include/"))))
{
const FilePath ucrtPath = versionPath.concat(FilePath("ucrt"));
if (ucrtPath.exists())
{
headerSearchPaths.push_back(ucrtPath);
break;
}
}
}
}
return headerSearchPaths;
}
FilePath getWindowsSdkRootPathUsingRegistry(ApplicationArchitectureType architectureType, const std::string& sdkVersion)
{
QString key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\";
if (architectureType == APPLICATION_ARCHITECTURE_X86_32)
{
key += "Wow6432Node\\";
}
key += ("Microsoft\\Microsoft SDKs\\Windows\\" + sdkVersion).c_str();
QSettings expressKey(key, QSettings::NativeFormat); // NativeFormat means from Registry on Windows.
QString value = expressKey.value("InstallationFolder").toString();
FilePath path(value.toStdString());
if (path.exists())
{
return path;
}
return FilePath();
}
}
@@ -4,9 +4,15 @@
#include <string>
#include <vector>
#include "utility/file/FilePath.h"
#include "utility/ApplicationArchitectureType.h"
namespace utility
{
std::vector<std::string> getCxxHeaderPaths(const std::string& compilerName);
std::vector<FilePath> getWindowsSdkHeaderSearchPaths(ApplicationArchitectureType architectureType);
FilePath getWindowsSdkRootPathUsingRegistry(ApplicationArchitectureType architectureType, const std::string& sdkVersion);
}
#endif // UTILITY_CXX_HEADER_DETECTION_H
+2
View File
@@ -40,6 +40,8 @@ std::string utility::executeProcess(const std::string& command, const std::strin
s_runningProcesses.erase(&process);
}
QProcess::ProcessError error = process.error();
std::string processoutput = process.readAll().toStdString();
process.close();
processoutput = utility::trim(processoutput);
+23 -35
View File
@@ -15,7 +15,8 @@
#include "utility/path_detector/cxx_header/CxxFrameworkPathDetector.h"
#include "utility/path_detector/cxx_header/CxxHeaderPathDetector.h"
#include "utility/path_detector/cxx_header/CxxVsHeaderPathDetector.h"
#include "utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.h"
#include "utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.h"
#include "utility/utilityApp.h"
@@ -89,46 +90,33 @@ std::shared_ptr<CombinedPathDetector> utility::getMavenExecutablePathDetector()
std::shared_ptr<CombinedPathDetector> utility::getCxxVsHeaderPathDetector()
{
std::shared_ptr<CombinedPathDetector> combinedDetector = std::make_shared<CombinedPathDetector>();
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(14, false, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(14, false, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(14, true, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(14, true, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(12, false, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(12, false, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(12, true, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(12, true, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(11, false, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(11, false, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(11, true, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(11, true, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(9, false, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(9, false, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(9, true, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(9, true, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVs15HeaderPathDetector>());
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2015, false, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2015, false, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2015, true, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2015, true, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2013, false, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2013, false, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2013, true, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2013, true, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2012, false, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2012, false, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2012, true, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2012, true, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2010, false, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2010, false, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2010, true, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVs10To14HeaderPathDetector>(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2010, true, APPLICATION_ARCHITECTURE_X86_64));
return combinedDetector;
}
std::shared_ptr<CombinedPathDetector> utility::getCxxHeaderPathDetector()
{
std::shared_ptr<CombinedPathDetector> combinedDetector = std::make_shared<CombinedPathDetector>();
std::shared_ptr<CombinedPathDetector> combinedDetector = getCxxVsHeaderPathDetector();
combinedDetector->addDetector(std::make_shared<CxxHeaderPathDetector>("gcc"));
combinedDetector->addDetector(std::make_shared<CxxHeaderPathDetector>("clang"));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(14, false, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(14, false, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(14, true, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(14, true, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(12, false, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(12, false, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(12, true, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(12, true, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(11, false, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(11, false, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(11, true, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(11, true, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(9, false, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(9, false, APPLICATION_ARCHITECTURE_X86_64));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(9, true, APPLICATION_ARCHITECTURE_X86_32));
combinedDetector->addDetector(std::make_shared<CxxVsHeaderPathDetector>(9, true, APPLICATION_ARCHITECTURE_X86_64));
return combinedDetector;
}