2023-12-03 15:31:50 +03:00
|
|
|
#define _CRT_SECURE_NO_WARNINGS
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
#if __cplusplus >= 201703L
|
|
|
|
|
#include <filesystem>
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-09-17 22:13:42 +03:00
|
|
|
#include "CompilationSupervisor.h"
|
|
|
|
|
#include "RunSupervisor.h"
|
|
|
|
|
#include "Global.h"
|
|
|
|
|
int main(int argc, char ** argv)
|
|
|
|
|
{
|
|
|
|
|
userWorkspace = String(argv[1]);
|
|
|
|
|
packageWorkspace = String(argv[2]);
|
|
|
|
|
maxKernels = atoi(argv[3]);
|
|
|
|
|
dvm_drv = String(argv[4]);
|
|
|
|
|
//--
|
|
|
|
|
freeKernels = maxKernels;
|
|
|
|
|
busyKernels= 0;
|
2023-12-03 15:31:50 +03:00
|
|
|
//--
|
|
|
|
|
|
|
|
|
|
#if __cplusplus >= 201703L
|
|
|
|
|
std::filesystem::current_path(packageWorkspace.getCharArray());
|
|
|
|
|
#else
|
|
|
|
|
chdir(packageWorkspace.getCharArray());
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-09-17 22:13:42 +03:00
|
|
|
userWorkspace.println();
|
|
|
|
|
packageWorkspace.println();
|
|
|
|
|
printf("%d\n", maxKernels);
|
|
|
|
|
|
|
|
|
|
CompilationSupervisor * compilationSupervisor = new CompilationSupervisor();
|
|
|
|
|
printf("%ld\n", compilationSupervisor->getLength());
|
|
|
|
|
compilationSupervisor->Do();
|
|
|
|
|
|
|
|
|
|
RunSupervisor * runSupervisor = new RunSupervisor(compilationSupervisor);
|
|
|
|
|
printf("%ld\n", runSupervisor->getLength());
|
|
|
|
|
runSupervisor->print();
|
|
|
|
|
runSupervisor->Do();
|
|
|
|
|
return 0;
|
|
|
|
|
}
|