Compiler-ID: GNU | |||||
C++-Version: C++17 | |||||
C++-Compiler: g++-8 | |||||
Flags: -D SPDLOG_COMPILED_LIB |
Compiler-ID: MSVC | |||||
Flags: -D SPDLOG_COMPILED_LIB |
Name: spdlog-user | |||||
Uses: spdlog/spdlog |
Name: test | |||||
Version: 0.0.0 | |||||
Depends: spdlog 1.4.2 |
Remote-Package: spdlog 1.4.2; git url=https://github.com/gabime/spdlog.git ref=v1.4.2 auto=spdlog/spdlog |
#include <spdlog/spdlog.h> | |||||
int write_message() { | |||||
spdlog::warn("This is a message generated by spdlog in the spdlog-user test library"); | |||||
return 42; | |||||
} |
#pragma once | |||||
extern int write_message(); |
#include "./spdlog_user.hpp" | |||||
#include <spdlog/spdlog.h> | |||||
int main() { | |||||
auto result = ::write_message(); | |||||
if (result != 42) { | |||||
spdlog::critical( | |||||
"The test library returned the wrong value (This is a REAL dds test failure, and is " | |||||
"very unexpected)"); | |||||
return 1; | |||||
} | |||||
return 0; | |||||
} |
from tests import DDS | |||||
from dds_ci import proc | |||||
def test_get_build_use_spdlog(dds: DDS): | |||||
dds.deps_get() | |||||
tc_fname = 'gcc.tc.dds' if 'gcc' in dds.default_builtin_toolchain else 'msvc.tc.dds' | |||||
tc = str(dds.test_dir / tc_fname) | |||||
dds.deps_build(toolchain=tc) | |||||
dds.build(toolchain=tc, apps=True) | |||||
proc.check_run((dds.build_dir / 'use-spdlog').with_suffix(dds.exe_suffix)) |