2023-04-11 17:21:04 +03:00
|
|
|
distributable:
|
|
|
|
url: https://github.com/fmtlib/fmt/archive/{{version}}.tar.gz
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
|
|
|
github: fmtlib/fmt
|
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
cmake.org: ^3
|
2024-06-11 00:47:30 +03:00
|
|
|
script:
|
|
|
|
- cmake . -B build $ARGS -DBUILD_SHARED_LIBS=ON
|
|
|
|
- run: make --jobs {{ hw.concurrency }} install
|
|
|
|
working-directory: build
|
|
|
|
- cmake . -B build-static $ARGS -DBUILD_SHARED_LIBS=OFF
|
|
|
|
- run: make --jobs {{ hw.concurrency }} install
|
|
|
|
working-directory: build-static
|
2023-05-02 05:50:30 +03:00
|
|
|
env:
|
|
|
|
ARGS:
|
|
|
|
- -DCMAKE_INSTALL_PREFIX="{{prefix}}"
|
|
|
|
- -DCMAKE_BUILD_TYPE=Release
|
|
|
|
linux/aarch64:
|
|
|
|
ARGS:
|
|
|
|
- -DCMAKE_C_FLAGS=-fPIC
|
|
|
|
- -DCMAKE_CXX_FLAGS=-fPIC
|
|
|
|
- -DCMAKE_EXE_LINKER_FLAGS=-pie
|
2023-04-11 17:21:04 +03:00
|
|
|
|
|
|
|
test:
|
2024-06-11 00:47:30 +03:00
|
|
|
- run: c++ $FIXTURE -lfmt -std=c++11
|
|
|
|
fixture:
|
|
|
|
extname: cc
|
|
|
|
content: |
|
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
|
|
|
#include <fmt/format.h>
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
std::string str = fmt::format("The answer is {}", 42);
|
|
|
|
std::cout << str;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
- test "$(./a.out)" = "The answer is 42"
|