pantry/projects/google.com/googletest/package.yml
2023-10-01 20:41:57 -04:00

33 lines
661 B
YAML

distributable:
url: https://github.com/google/googletest/archive/v{{version}}.tar.gz
strip-components: 1
versions:
github: google/googletest
build:
dependencies:
cmake.org: ^3
working-directory: build
script: |
cmake .. $ARGS
make --jobs {{ hw.concurrency }} install
env:
ARGS:
- -DBUILD_TESTING=OFF
- -DCMAKE_INSTALL_PREFIX={{prefix}}
- -DCMAKE_BUILD_TYPE=Release
test:
fixture: |
#include <gtest/gtest.h>
#include <gtest/gtest-death-test.h>
TEST(Simple, Boolean) {
ASSERT_TRUE(true);
}
script: |
mv $FIXTURE a.c
c++ a.c -std=c++14 -lgtest -lgtest_main -pthread
./a.out