|
|
|
|
|
|
|
|
opt_string c_compile_template; |
|
|
opt_string c_compile_template; |
|
|
opt_string cxx_compile_template; |
|
|
opt_string cxx_compile_template; |
|
|
opt_string create_archive_template; |
|
|
opt_string create_archive_template; |
|
|
|
|
|
opt_string link_exe_template; |
|
|
opt_string warning_flags; |
|
|
opt_string warning_flags; |
|
|
|
|
|
|
|
|
opt_string archive_suffix; |
|
|
opt_string archive_suffix; |
|
|
|
|
|
|
|
|
|| try_single("Warning-Flags", warning_flags) |
|
|
|| try_single("Warning-Flags", warning_flags) |
|
|
|| try_single("Archive-Suffix", archive_suffix) |
|
|
|| try_single("Archive-Suffix", archive_suffix) |
|
|
|| try_single("Object-Suffix", object_suffix) |
|
|
|| try_single("Object-Suffix", object_suffix) |
|
|
|
|
|
|| try_single("Link-Executable-Template", link_exe_template) |
|
|
|| false; |
|
|
|| false; |
|
|
// clang-format on |
|
|
// clang-format on |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
require_key("Compile-C-Template", c_compile_template); |
|
|
require_key("Compile-C-Template", c_compile_template); |
|
|
require_key("Compile-C++-Template", cxx_compile_template); |
|
|
require_key("Compile-C++-Template", cxx_compile_template); |
|
|
require_key("Create-Archive-Template", create_archive_template); |
|
|
require_key("Create-Archive-Template", create_archive_template); |
|
|
|
|
|
require_key("Link-Executable-Template", link_exe_template); |
|
|
|
|
|
|
|
|
require_key("Archive-Suffix", archive_suffix); |
|
|
require_key("Archive-Suffix", archive_suffix); |
|
|
require_key("Object-Suffix", object_suffix); |
|
|
require_key("Object-Suffix", object_suffix); |
|
|
|
|
|
|
|
|
inc_template.value(), |
|
|
inc_template.value(), |
|
|
def_template.value(), |
|
|
def_template.value(), |
|
|
create_archive_template.value(), |
|
|
create_archive_template.value(), |
|
|
|
|
|
link_exe_template.value(), |
|
|
warning_flags.value_or(""), |
|
|
warning_flags.value_or(""), |
|
|
archive_suffix.value(), |
|
|
archive_suffix.value(), |
|
|
object_suffix.value(), |
|
|
object_suffix.value(), |
|
|
|
|
|
|
|
|
ret._c_compile.push_back(c_compiler_name); |
|
|
ret._c_compile.push_back(c_compiler_name); |
|
|
extend(ret._c_compile, common_flags); |
|
|
extend(ret._c_compile, common_flags); |
|
|
extend(ret._c_compile, c_flags); |
|
|
extend(ret._c_compile, c_flags); |
|
|
|
|
|
|
|
|
ret._cxx_compile.push_back(cxx_compiler_name); |
|
|
ret._cxx_compile.push_back(cxx_compiler_name); |
|
|
extend(ret._cxx_compile, common_flags); |
|
|
extend(ret._cxx_compile, common_flags); |
|
|
extend(ret._cxx_compile, cxx_flags); |
|
|
extend(ret._cxx_compile, cxx_flags); |
|
|
|
|
|
|
|
|
|
|
|
ret._link_exe_template.push_back(cxx_compiler_name); |
|
|
|
|
|
extend(ret._link_exe_template, |
|
|
|
|
|
{ |
|
|
|
|
|
"-g", |
|
|
|
|
|
"-fPIC", |
|
|
|
|
|
"-fdiagnostics-color", |
|
|
|
|
|
"-pthread", |
|
|
|
|
|
"<INPUTS>", |
|
|
|
|
|
"-o", |
|
|
|
|
|
"<OUT>", |
|
|
|
|
|
}); |
|
|
} else if (s == "msvc") { |
|
|
} else if (s == "msvc") { |
|
|
ret._inc_template = {"/I<PATH>"}; |
|
|
ret._inc_template = {"/I<PATH>"}; |
|
|
ret._def_template = {"/D<DEF>"}; |
|
|
ret._def_template = {"/D<DEF>"}; |
|
|
|
|
|
|
|
|
ret._archive_suffix = ".lib"; |
|
|
ret._archive_suffix = ".lib"; |
|
|
ret._object_suffix = ".obj"; |
|
|
ret._object_suffix = ".obj"; |
|
|
ret._archive_template = {"lib", "/nologo", "/OUT:<ARCHIVE>", "<OBJECTS>"}; |
|
|
ret._archive_template = {"lib", "/nologo", "/OUT:<ARCHIVE>", "<OBJECTS>"}; |
|
|
ret._warning_flags = {"/W4"}; |
|
|
|
|
|
|
|
|
ret._link_exe_template |
|
|
|
|
|
= {"cl.exe", "/nologo", "/std:c++latest", "/EHsc", "<INPUTS>", "/Fe<OUT>"}; |
|
|
|
|
|
ret._warning_flags = {"/W4"}; |
|
|
} else { |
|
|
} else { |
|
|
return std::nullopt; |
|
|
return std::nullopt; |
|
|
} |
|
|
} |