2019-05-14 16:47:35 +02:00
|
|
|
/*
|
2020-02-22 23:48:51 +01:00
|
|
|
* Copyright (C) 2019-2020 Intel Corporation
|
2019-05-14 16:47:35 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2020-02-27 16:17:08 +01:00
|
|
|
#include "shared/offline_compiler/source/decoder/binary_decoder.h"
|
|
|
|
|
#include "shared/offline_compiler/source/decoder/binary_encoder.h"
|
|
|
|
|
#include "shared/offline_compiler/source/offline_compiler.h"
|
|
|
|
|
#include "shared/offline_compiler/source/utilities/get_current_dir.h"
|
|
|
|
|
#include "shared/offline_compiler/source/utilities/safety_caller.h"
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/os_interface/os_library.h"
|
2020-02-24 10:22:30 +01:00
|
|
|
|
2019-05-14 16:47:35 +02:00
|
|
|
#include <CL/cl.h>
|
|
|
|
|
|
|
|
|
|
#include <fstream>
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
|
|
class MultiCommand {
|
|
|
|
|
public:
|
2019-11-21 13:52:43 +01:00
|
|
|
static MultiCommand *create(const std::vector<std::string> &argv, int &retVal);
|
2019-05-14 16:47:35 +02:00
|
|
|
void deleteBuildsWithWarnigs();
|
|
|
|
|
|
|
|
|
|
std::vector<OfflineCompiler *> singleBuilds;
|
|
|
|
|
|
|
|
|
|
MultiCommand &operator=(const MultiCommand &) = delete;
|
|
|
|
|
MultiCommand(const MultiCommand &) = delete;
|
|
|
|
|
~MultiCommand();
|
|
|
|
|
|
2019-11-21 13:52:43 +01:00
|
|
|
std::string outDirForBuilds;
|
|
|
|
|
std::string outputFileList = "";
|
2019-05-14 16:47:35 +02:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
int splitLineInSeparateArgs(std::vector<std::string> &qargs, const std::string &command, int numberOfBuild);
|
|
|
|
|
void openFileWithBuildsArguments();
|
|
|
|
|
void addAdditionalOptionsToSingleCommandLine(std::vector<std::string> &, int);
|
2019-07-01 16:42:45 +02:00
|
|
|
void printHelp();
|
2019-11-21 13:52:43 +01:00
|
|
|
int initialize(const std::vector<std::string> &allArgs);
|
2019-05-14 16:47:35 +02:00
|
|
|
int showResults();
|
|
|
|
|
int singleBuild(size_t numArgs, const std::vector<std::string> &allArgs);
|
|
|
|
|
std::string eraseExtensionFromPath(std::string &filePath);
|
2019-11-21 13:52:43 +01:00
|
|
|
std::string OutFileName;
|
2019-05-14 16:47:35 +02:00
|
|
|
|
|
|
|
|
std::vector<int> retValues;
|
|
|
|
|
std::string pathToCMD;
|
|
|
|
|
std::vector<std::string> lines;
|
|
|
|
|
bool quiet = false;
|
|
|
|
|
|
|
|
|
|
MultiCommand();
|
|
|
|
|
};
|
|
|
|
|
} // namespace NEO
|