fix(ansi.h): fixed multi symbol export
supports_ansi_colors has been marked inline to allow its use in multiple translation units
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# *********************************************************************** #
|
||||
project('libconfig', ['cpp', 'c'], version: 'v2.2.0', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
|
||||
project('libconfig', ['cpp', 'c'], version: 'v2.2.1', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
|
||||
|
||||
# Add default visibility for all C++ targets
|
||||
add_project_arguments('-fvisibility=default', language: 'cpp')
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
namespace fourdst::config::utils {
|
||||
|
||||
bool supports_ansi_colors() {
|
||||
inline bool supports_ansi_colors() {
|
||||
if (std::getenv("NO_COLOR")) return false;
|
||||
if (std::getenv("FORCE_COLOR")) return true;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace fourdst::config::utils {
|
||||
#endif
|
||||
}
|
||||
|
||||
const static bool TERM_COLOR_SUPPORT = supports_ansi_colors();
|
||||
inline const bool TERM_COLOR_SUPPORT = supports_ansi_colors();
|
||||
|
||||
class ANSIColor {
|
||||
public:
|
||||
@@ -54,9 +54,9 @@ namespace fourdst::config::utils {
|
||||
|
||||
};
|
||||
|
||||
static ANSIColor RED{"\033[31m"};
|
||||
static ANSIColor GREEN{"\033[32m"};
|
||||
static ANSIColor BLUE{"\033[34m"};
|
||||
static ANSIColor CYAN{"\033[36m"};
|
||||
static ANSIColor RESET{"\033[0m"};
|
||||
inline ANSIColor RED{"\033[31m"};
|
||||
inline ANSIColor GREEN{"\033[32m"};
|
||||
inline ANSIColor BLUE{"\033[34m"};
|
||||
inline ANSIColor CYAN{"\033[36m"};
|
||||
inline ANSIColor RESET{"\033[0m"};
|
||||
}
|
||||
Reference in New Issue
Block a user