mirror of
https://github.com/ivabus/pantry
synced 2024-11-25 18:05:07 +03:00
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
distributable:
|
|
url: https://github.com/gabime/spdlog/archive/v{{version}}.tar.gz
|
|
strip-components: 1
|
|
|
|
versions:
|
|
github: gabime/spdlog
|
|
|
|
dependencies:
|
|
fmt.dev: ^10
|
|
|
|
build:
|
|
dependencies:
|
|
tea.xyz/gx/cc: c99
|
|
tea.xyz/gx/make: '*'
|
|
cmake.org: ^3
|
|
working-directory: build
|
|
script:
|
|
- 'sed -i.bak "s|// #define SPDLOG_FMT_EXTERNAL|#define SPDLOG_FMT_EXTERNAL|" ../include/spdlog/tweakme.h'
|
|
|
|
- cmake ..
|
|
-DSPDLOG_BUILD_BENCH=OFF
|
|
-DSPDLOG_BUILD_TESTS=OFF
|
|
-DSPDLOG_FMT_EXTERNAL=ON
|
|
-DSPDLOG_BUILD_SHARED=ON
|
|
-DCMAKE_INSTALL_PREFIX={{prefix}}
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
|
|
- make --jobs {{ hw.concurrency }} install
|
|
|
|
test:
|
|
dependencies:
|
|
tea.xyz/gx/cc: c99
|
|
fixture: |
|
|
#include "spdlog/sinks/basic_file_sink.h"
|
|
#include <iostream>
|
|
#include <memory>
|
|
int main()
|
|
{
|
|
try {
|
|
auto console = spdlog::basic_logger_mt("basic_logger", "basic-log.txt");
|
|
console->info("Test");
|
|
}
|
|
catch (const spdlog::spdlog_ex &ex)
|
|
{
|
|
std::cout << "Log init failed: " << ex.what() << std::endl;
|
|
return 1;
|
|
}
|
|
}
|
|
script: |
|
|
mv $FIXTURE b.cpp
|
|
c++ -std=c++11 b.cpp -lfmt
|
|
./a.out
|
|
cat basic-log.txt | grep Test
|