defines
This commit is contained in:
parent
35f943af53
commit
5af6d0080a
8 changed files with 93 additions and 73 deletions
|
|
@ -31,11 +31,15 @@ using namespace Crafter::Build;
|
|||
namespace fs = std::filesystem;
|
||||
|
||||
void Source::GetSourceFiles(std::string clangDir, const Configuration& config, fs::path pcmDir, std::string target, const std::string& march, const std::string& flags, std::vector<std::thread>& threads, const std::vector<Module>& modules, std::string& files, const fs::path& buildDir) {
|
||||
std::string defines;
|
||||
for(const Define& define : config.defines) {
|
||||
defines+=define.ToString();
|
||||
}
|
||||
for(const fs::path& sourceFile : config.sourceFiles) {
|
||||
files+=std::format("{}_source.o ",(buildDir/sourceFile.filename()).generic_string());
|
||||
if(Source::Check(sourceFile, modules, config, buildDir)) {
|
||||
threads.emplace_back([&config, sourceFile, pcmDir, target, clangDir, flags, march, buildDir](){
|
||||
std::string command = std::format("{} -std={} {}.cpp -fprebuilt-module-path={} -c -O{} {} {} -o {}_source.o {}", clangDir, config.standard, sourceFile.generic_string(), pcmDir.generic_string(), config.optimizationLevel, march, flags, (buildDir/sourceFile.filename()).generic_string(), target);
|
||||
threads.emplace_back([&config, sourceFile, pcmDir, target, clangDir, flags, march, buildDir, defines](){
|
||||
std::string command = std::format("{} {} -std={} {}.cpp -fprebuilt-module-path={} -c -O{} {} {} -o {}_source.o {}", clangDir, defines, config.standard, sourceFile.generic_string(), pcmDir.generic_string(), config.optimizationLevel, march, flags, (buildDir/sourceFile.filename()).generic_string(), target);
|
||||
if(config.verbose) {
|
||||
std::cout << command << std::endl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue