This commit is contained in:
Jacob Heider 2024-06-10 17:47:30 -04:00 committed by Jacob Heider
parent e29e9faf7a
commit 0c2e333750

View file

@ -8,10 +8,13 @@ versions:
build: build:
dependencies: dependencies:
cmake.org: ^3 cmake.org: ^3
script:
- cmake . -B build $ARGS -DBUILD_SHARED_LIBS=ON
- run: make --jobs {{ hw.concurrency }} install
working-directory: build working-directory: build
script: | - cmake . -B build-static $ARGS -DBUILD_SHARED_LIBS=OFF
cmake .. $ARGS - run: make --jobs {{ hw.concurrency }} install
make --jobs {{ hw.concurrency }} install working-directory: build-static
env: env:
ARGS: ARGS:
- -DCMAKE_INSTALL_PREFIX="{{prefix}}" - -DCMAKE_INSTALL_PREFIX="{{prefix}}"
@ -23,7 +26,10 @@ build:
- -DCMAKE_EXE_LINKER_FLAGS=-pie - -DCMAKE_EXE_LINKER_FLAGS=-pie
test: test:
fixture: | - run: c++ $FIXTURE -lfmt -std=c++11
fixture:
extname: cc
content: |
#include <iostream> #include <iostream>
#include <string> #include <string>
#include <fmt/format.h> #include <fmt/format.h>
@ -33,7 +39,4 @@ test:
std::cout << str; std::cout << str;
return 0; return 0;
} }
script: | - test "$(./a.out)" = "The answer is 42"
mv $FIXTURE fixture.cc
c++ fixture.cc -lfmt -std=c++11
test "$(./a.out)" = "The answer is 42"