From eb7c9f97959e4c074698eea72b7da20d25f19faa Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 18 Sep 2021 15:54:34 +0200 Subject: Initial support for compiling with msvc/cl.exe on windows. --- src/configure.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/configure.cc') diff --git a/src/configure.cc b/src/configure.cc index b3517dc..f796906 100644 --- a/src/configure.cc +++ b/src/configure.cc @@ -6,6 +6,7 @@ #include #include #include +#include #include @@ -18,10 +19,23 @@ std::filesystem::path configurationFile("configuration.cc"); std::filesystem::path configHeaderFile("config.h"); const std::map default_configuration{}; + +#if !defined(_WIN32) const std::map& __attribute__((weak)) configuration() { return default_configuration; } +#else +//extern const char * pWeakValue; +//extern const char * pDefaultWeakValue = NULL; +// +//#pragma comment(linker, "/alternatename:_pWeakValue=_pDefaultWeakValue") +const std::map& configuration() +{ + return default_configuration; +} + +#endif bool hasConfiguration(const std::string& key) { -- cgit v1.2.3