Migrated
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
#include "helper.h"
|
||||
#include "tier1/utlvector.h"
|
||||
#include "libgen.h"
|
||||
#include <cstdio>
|
||||
|
||||
struct ClangFile_t
|
||||
{
|
||||
@@ -21,11 +20,10 @@ CLDProject CCProject::Compile()
|
||||
for (auto &file: files)
|
||||
{
|
||||
CUtlString szOutputFile = CUtlString("%s/cc/%u_%s/%s/%s.o",FPC_TEMPORAL_DIRNAME, hash, m_szName.GetString(), IFileSystem2::OwnDirectory(), file.GetString());
|
||||
CUtlString szOutputDir = szOutputFile;
|
||||
szOutputDir = dirname(szOutputDir);
|
||||
IFileSystem2::MakeDirectory(szOutputDir);
|
||||
CUtlString szOutputDir;
|
||||
CUtlVector<CUtlString> args;
|
||||
|
||||
CUtlVector<CUtlString> args = {
|
||||
args = {
|
||||
"-g",
|
||||
"-c",
|
||||
"-o",
|
||||
@@ -51,7 +49,14 @@ CLDProject CCProject::Compile()
|
||||
args.AppendTail("-include");
|
||||
args.AppendTail(include);
|
||||
}
|
||||
if (!IFileSystem2::ShouldRecompile(file, szOutputFile))
|
||||
goto skipcompile;
|
||||
szOutputDir = szOutputFile;
|
||||
szOutputDir = dirname(szOutputDir);
|
||||
IFileSystem2::MakeDirectory(szOutputDir);
|
||||
IRunner::Run("clang", args);
|
||||
|
||||
skipcompile:
|
||||
proj.objects.AppendTail((CObject){szOutputFile});
|
||||
|
||||
ClangFile_t cfile = {};
|
||||
|
||||
Reference in New Issue
Block a user