brought back functionality from previous builds but now cross-platform
This commit is contained in:
@@ -22,12 +22,19 @@ CLDProject CCProject::Compile()
|
||||
proj.m_szName = m_szName;
|
||||
unsigned int hash = GenerateProjectHash();
|
||||
for (auto &file: files)
|
||||
{
|
||||
CUtlString szTarget = m_target.GetTriplet();
|
||||
CUtlString szOutputFile = CUtlString("%s/%s/cc/%u_%s/%s/%s.o",FPC_TEMPORAL_DIRNAME, szTarget.GetString(), hash, m_szName.GetString(), IFileSystem2::BuildDirectory(), file.GetString());
|
||||
CUtlString szOutputDir = szOutputFile;
|
||||
szOutputDir = dirname(szOutputDir);
|
||||
IFileSystem2::MakeDirectory(szOutputDir);
|
||||
}
|
||||
for (auto &file: files)
|
||||
{
|
||||
CUtlVector<CUtlString> args;
|
||||
V_printf(" CC %s\n", file.GetString());
|
||||
CUtlString szTarget = m_target.GetTriplet();
|
||||
CUtlString szOutputFile = CUtlString("%s/%s/cc/%u_%s/%s/%s.o",FPC_TEMPORAL_DIRNAME, szTarget.GetString(), hash, m_szName.GetString(), IFileSystem2::BuildDirectory(), file.GetString());
|
||||
CUtlString szOutputDir;
|
||||
|
||||
args = {
|
||||
"-target",
|
||||
@@ -40,6 +47,8 @@ CLDProject CCProject::Compile()
|
||||
};
|
||||
if (!strcmp(Plat_GetExtension(file),"cpp"))
|
||||
args.AppendTail("-std=c++17");
|
||||
else if (!strcmp(Plat_GetExtension(file),"mm"))
|
||||
;
|
||||
else
|
||||
args.AppendTail("-std=c99");
|
||||
|
||||
@@ -76,9 +85,6 @@ CLDProject CCProject::Compile()
|
||||
}
|
||||
if (!IFileSystem2::ShouldRecompile(file, szOutputFile))
|
||||
goto skipcompile;
|
||||
szOutputDir = szOutputFile;
|
||||
szOutputDir = dirname(szOutputDir);
|
||||
IFileSystem2::MakeDirectory(szOutputDir);
|
||||
IRunner::Run("clang", args);
|
||||
|
||||
skipcompile:
|
||||
|
||||
Reference in New Issue
Block a user