pantry/projects/google.com/glog/package.yml
Jacob Heider 856e8cd2df fix(glog)
glog 0.7.0 can no long be used without a build system.

frankly, i find that stupid, but it's C++, and i don't accept C++'s foibles anymore anyway.

closes #5243
2024-02-23 00:48:24 -05:00

51 lines
1.2 KiB
YAML

distributable:
url: https://github.com/google/glog/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
versions:
github: google/glog/tags
strip: /^v/
dependencies:
gflags.github.io: '*'
build:
dependencies:
cmake.org: '*'
script: |
cmake -S . -B build -G "Unix Makefiles" $ARGS
cmake --build build
cmake --build build --target install
env:
ARGS:
- -DCMAKE_INSTALL_PREFIX={{prefix}}
- -DBUILD_SHARED_LIBS=ON
- -DCMAKE_CXX_FLAGS=-std=c++14
test:
dependencies:
cmake.org: '*'
linux:
gnu.org/make: '*'
llvm.org: '*'
script:
- run: cat $FIXTURE >main.cpp
fixture: |
#include <glog/logging.h>
#include <iostream>
#include <memory>
int main(int argc, char* argv[])
{
google::InitGoogleLogging(argv[0]);
LOG(INFO) << "test";
}
- run: cat $FIXTURE >CMakeLists.txt
fixture: |
cmake_minimum_required (VERSION 3.16)
project (myproj VERSION 1.0)
find_package (glog 0.6.0 REQUIRED)
add_executable (myapp main.cpp)
target_link_libraries (myapp glog::glog)
- cmake -S . -B build
- cmake --build build
- ./build/myapp