From cc4e14d243f4e7e1ad487d8865c5ffc8423e473d Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 28 Dec 2022 13:49:53 +0100 Subject: Add detected toolchain to configuration.cc --- src/tools.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/tools.h') diff --git a/src/tools.h b/src/tools.h index 49069d5..bedb708 100644 --- a/src/tools.h +++ b/src/tools.h @@ -8,12 +8,6 @@ #include "ctor.h" -enum class ToolChain -{ - gcc, - clang, -}; - enum class opt { // gcc/clang @@ -36,12 +30,15 @@ enum class opt custom, // entire option taken verbatim from }; +//! Get tool-chain type from compiler path string +ctor::toolchain getToolChain(const std::string& compiler); + //! Get tool-chain type from output system (via configuration) -ToolChain getToolChain(ctor::output_system system); +ctor::toolchain getToolChain(ctor::output_system system); //! Get tool argument(s) for specific option type matching the supplied //! tool-chain -std::vector getOption(ToolChain tool_chain, +std::vector getOption(ctor::toolchain toolchain, opt option, const std::string& arg = {}); @@ -49,4 +46,4 @@ std::vector getOption(ToolChain tool_chain, //! ie. { opt::InludePath, "foo/bar" } from "-Ifoo/bar" //! Returns { opt::Custom, flag } if unknown. std::pair getOption(const std::string& flag, - ToolChain tool_chain = ToolChain::gcc); + ctor::toolchain toolchain = ctor::toolchain::gcc); -- cgit v1.2.3