conan profile show default or conan profile show <profile> if custom profile is in use)[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=15
build_type=Release
[options]
[build_requires]
[env]
Compile and run the following:
#include "spdlog/spdlog.h"
#include "spdlog/sinks/rotating_file_sink.h"
#include <string>
int main() {
const std::string name = "logs/serial.txt";
auto dist_sink = std::make_shared<spdlog::sinks::dist_sink_mt>();
dist_sink->add_sink(std::make_shared<spdlog::sinks::rotating_file_sink_mt>("logs/" + name + ".txt", 1048576 * 5, 2, true));
return 0;
}
Always crashes trying to use fmt.
I'm not a beta user yet, so I only provide information.
spdlog bundled fmt version table:
| spdlog version | fmt version |
|-----------------|--------------|
| v1.5.0 and above | 6.1.2 |
| v1.4.0, v1.4.1, v1.4.2 | 6.0.0 |
I think the should be the following change:
@property
def _fmt_version(self):
spdlog_version = tools.Version(self.version)
if spdlog_version >= "1.5.0"
return "6.1.2"
else:
return "6.0.0"
def requirements(self):
self.requires("fmt/{}".format(self._fmt_version))
we had the same problem -> we defined in our conanfile.txt the dependency to fmt directly
I'm not a beta user yet, so I only provide information.
spdlog bundled fmt version table:
spdlog version fmt version
v1.5.0 and above 6.1.2
v1.4.0, v1.4.1, v1.4.2 6.0.0I think the should be the following change:
@property def _fmt_version(self): spdlog_version = tools.Version(self.version) if spdlog_version >= "1.5.0" return "6.1.2" else: return "6.0.0" def requirements(self): self.requires("fmt/{}".format(self._fmt_version))
@tt4g even if you are not a BETA user, you can open a PR anyway. Thanks for showing the possible solution. Regards!
Most helpful comment
I'm not a beta user yet, so I only provide information.
spdlog bundled fmt version table:
| spdlog version | fmt version |
|-----------------|--------------|
| v1.5.0 and above | 6.1.2 |
| v1.4.0, v1.4.1, v1.4.2 | 6.0.0 |
I think the should be the following change: