mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
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
This commit is contained in:
parent
1b0e36efc1
commit
856e8cd2df
1 changed files with 27 additions and 13 deletions
|
@ -20,18 +20,32 @@ build:
|
||||||
ARGS:
|
ARGS:
|
||||||
- -DCMAKE_INSTALL_PREFIX={{prefix}}
|
- -DCMAKE_INSTALL_PREFIX={{prefix}}
|
||||||
- -DBUILD_SHARED_LIBS=ON
|
- -DBUILD_SHARED_LIBS=ON
|
||||||
|
- -DCMAKE_CXX_FLAGS=-std=c++14
|
||||||
|
|
||||||
test:
|
test:
|
||||||
fixture: |
|
dependencies:
|
||||||
#include <glog/logging.h>
|
cmake.org: '*'
|
||||||
#include <iostream>
|
linux:
|
||||||
#include <memory>
|
gnu.org/make: '*'
|
||||||
int main(int argc, char* argv[])
|
llvm.org: '*'
|
||||||
{
|
script:
|
||||||
google::InitGoogleLogging(argv[0]);
|
- run: cat $FIXTURE >main.cpp
|
||||||
LOG(INFO) << "test";
|
fixture: |
|
||||||
}
|
#include <glog/logging.h>
|
||||||
script: |
|
#include <iostream>
|
||||||
mv $FIXTURE test.cpp
|
#include <memory>
|
||||||
g++ test.cpp -lglog -lgflags -o test
|
int main(int argc, char* argv[])
|
||||||
./test
|
{
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in a new issue