| @@ -0,0 +1,4 @@ | |||
| Compiler-ID: GNU | |||
| C++-Version: C++17 | |||
| C++-Compiler: g++-8 | |||
| Flags: -D SPDLOG_COMPILED_LIB | |||
| @@ -0,0 +1,2 @@ | |||
| Compiler-ID: MSVC | |||
| Flags: -D SPDLOG_COMPILED_LIB | |||
| @@ -0,0 +1,3 @@ | |||
| Name: spdlog-user | |||
| Uses: spdlog/spdlog | |||
| @@ -0,0 +1,4 @@ | |||
| Name: test | |||
| Version: 0.0.0 | |||
| Depends: spdlog 1.4.2 | |||
| @@ -0,0 +1 @@ | |||
| Remote-Package: spdlog 1.4.2; git url=https://github.com/gabime/spdlog.git ref=v1.4.2 auto=spdlog/spdlog | |||
| @@ -0,0 +1,6 @@ | |||
| #include <spdlog/spdlog.h> | |||
| int write_message() { | |||
| spdlog::warn("This is a message generated by spdlog in the spdlog-user test library"); | |||
| return 42; | |||
| } | |||
| @@ -0,0 +1,3 @@ | |||
| #pragma once | |||
| extern int write_message(); | |||
| @@ -0,0 +1,14 @@ | |||
| #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; | |||
| } | |||
| @@ -0,0 +1,12 @@ | |||
| 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)) | |||