From 856e8cd2df3bbfb37930dfbbf35356003a22e7b8 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Fri, 23 Feb 2024 00:30:42 -0500 Subject: [PATCH] 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 --- projects/google.com/glog/package.yml | 40 +++++++++++++++++++--------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/projects/google.com/glog/package.yml b/projects/google.com/glog/package.yml index 2d9b5c49..34ffc820 100644 --- a/projects/google.com/glog/package.yml +++ b/projects/google.com/glog/package.yml @@ -20,18 +20,32 @@ build: ARGS: - -DCMAKE_INSTALL_PREFIX={{prefix}} - -DBUILD_SHARED_LIBS=ON + - -DCMAKE_CXX_FLAGS=-std=c++14 test: - fixture: | - #include - #include - #include - int main(int argc, char* argv[]) - { - google::InitGoogleLogging(argv[0]); - LOG(INFO) << "test"; - } - script: | - mv $FIXTURE test.cpp - g++ test.cpp -lglog -lgflags -o test - ./test + dependencies: + cmake.org: '*' + linux: + gnu.org/make: '*' + llvm.org: '*' + script: + - run: cat $FIXTURE >main.cpp + fixture: | + #include + #include + #include + 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