[M5] verify-curated-db.sh + boost recipe (header-only)
This commit is contained in:
8
scripts/curated-snippets/abseil-cpp.cpp
Normal file
8
scripts/curated-snippets/abseil-cpp.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <absl/strings/str_cat.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
auto s = absl::StrCat("abseil-", "cpp");
|
||||
std::println("abseil-cpp ok: {}", s);
|
||||
return 0;
|
||||
}
|
||||
8
scripts/curated-snippets/boost.cpp
Normal file
8
scripts/curated-snippets/boost.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <boost/filesystem.hpp>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
boost::filesystem::path p{"/tmp"};
|
||||
std::println("boost ok: {}", p.string());
|
||||
return 0;
|
||||
}
|
||||
13
scripts/curated-snippets/cli11.cpp
Normal file
13
scripts/curated-snippets/cli11.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <CLI/CLI.hpp>
|
||||
import std;
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
CLI::App app{"verify"};
|
||||
try {
|
||||
app.parse(argc, argv);
|
||||
} catch (const CLI::ParseError& e) {
|
||||
return app.exit(e);
|
||||
}
|
||||
std::println("cli11 ok");
|
||||
return 0;
|
||||
}
|
||||
7
scripts/curated-snippets/curl.cpp
Normal file
7
scripts/curated-snippets/curl.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <curl/curl.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
std::println("curl ok: {}", curl_version());
|
||||
return 0;
|
||||
}
|
||||
8
scripts/curated-snippets/cxxopts.cpp
Normal file
8
scripts/curated-snippets/cxxopts.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <cxxopts.hpp>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
cxxopts::Options opts("verify", "verify cxxopts");
|
||||
std::println("cxxopts ok: {}", opts.program());
|
||||
return 0;
|
||||
}
|
||||
8
scripts/curated-snippets/eigen.cpp
Normal file
8
scripts/curated-snippets/eigen.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <Eigen/Core>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
Eigen::Vector2d v(1.0, 2.0);
|
||||
std::println("eigen ok: ({},{})", v[0], v[1]);
|
||||
return 0;
|
||||
}
|
||||
7
scripts/curated-snippets/fmt.cpp
Normal file
7
scripts/curated-snippets/fmt.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <fmt/core.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
fmt::print("fmt ok\n");
|
||||
return 0;
|
||||
}
|
||||
13
scripts/curated-snippets/freetype.cpp
Normal file
13
scripts/curated-snippets/freetype.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
FT_Library lib = nullptr;
|
||||
auto err = FT_Init_FreeType(&lib);
|
||||
if (err == 0 && lib) {
|
||||
FT_Done_FreeType(lib);
|
||||
}
|
||||
std::println("freetype ok: init err {}", err);
|
||||
return 0;
|
||||
}
|
||||
9
scripts/curated-snippets/glfw.cpp
Normal file
9
scripts/curated-snippets/glfw.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <GLFW/glfw3.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
int major = 0, minor = 0, rev = 0;
|
||||
glfwGetVersion(&major, &minor, &rev);
|
||||
std::println("glfw ok: {}.{}.{}", major, minor, rev);
|
||||
return 0;
|
||||
}
|
||||
8
scripts/curated-snippets/glm.cpp
Normal file
8
scripts/curated-snippets/glm.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <glm/glm.hpp>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
glm::vec3 v(1.0f, 2.0f, 3.0f);
|
||||
std::println("glm ok: ({},{},{})", v.x, v.y, v.z);
|
||||
return 0;
|
||||
}
|
||||
7
scripts/curated-snippets/grpc.cpp
Normal file
7
scripts/curated-snippets/grpc.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <grpcpp/grpcpp.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
std::println("grpc ok: {}", grpc::Version());
|
||||
return 0;
|
||||
}
|
||||
10
scripts/curated-snippets/libjpeg.cpp
Normal file
10
scripts/curated-snippets/libjpeg.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
// libjpeg's jpeglib.h relies on stdio types being already declared.
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <jpeglib.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
std::println("libjpeg ok: lib version {}", JPEG_LIB_VERSION);
|
||||
return 0;
|
||||
}
|
||||
7
scripts/curated-snippets/libpng.cpp
Normal file
7
scripts/curated-snippets/libpng.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <png.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
std::println("libpng ok: {}", png_access_version_number());
|
||||
return 0;
|
||||
}
|
||||
10
scripts/curated-snippets/magic_enum.cpp
Normal file
10
scripts/curated-snippets/magic_enum.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <magic_enum/magic_enum.hpp>
|
||||
import std;
|
||||
|
||||
enum class Color { Red, Green, Blue };
|
||||
|
||||
int main() {
|
||||
auto n = magic_enum::enum_count<Color>();
|
||||
std::println("magic_enum ok: {} entries", n);
|
||||
return 0;
|
||||
}
|
||||
9
scripts/curated-snippets/nlohmann_json.cpp
Normal file
9
scripts/curated-snippets/nlohmann_json.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
nlohmann::json j;
|
||||
j["k"] = 42;
|
||||
std::println("{}", j.dump());
|
||||
return 0;
|
||||
}
|
||||
9
scripts/curated-snippets/openssl.cpp
Normal file
9
scripts/curated-snippets/openssl.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <openssl/evp.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
EVP_MD_CTX* ctx = EVP_MD_CTX_new();
|
||||
EVP_MD_CTX_free(ctx);
|
||||
std::println("openssl ok");
|
||||
return 0;
|
||||
}
|
||||
8
scripts/curated-snippets/protobuf.cpp
Normal file
8
scripts/curated-snippets/protobuf.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <google/protobuf/arena.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
google::protobuf::Arena arena;
|
||||
std::println("protobuf ok: arena size {}", arena.SpaceUsed());
|
||||
return 0;
|
||||
}
|
||||
12
scripts/curated-snippets/range-v3.cpp
Normal file
12
scripts/curated-snippets/range-v3.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <range/v3/view/iota.hpp>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
auto v = ranges::views::iota(0, 5);
|
||||
int sum = 0;
|
||||
for (int i : v) {
|
||||
sum += i;
|
||||
}
|
||||
std::println("range-v3 ok: {}", sum);
|
||||
return 0;
|
||||
}
|
||||
8
scripts/curated-snippets/sdl2.cpp
Normal file
8
scripts/curated-snippets/sdl2.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <SDL2/SDL.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
auto* err = SDL_GetError();
|
||||
std::println("sdl2 ok: SDL_GetError() = '{}'", err ? err : "");
|
||||
return 0;
|
||||
}
|
||||
8
scripts/curated-snippets/spdlog.cpp
Normal file
8
scripts/curated-snippets/spdlog.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
spdlog::set_level(spdlog::level::info);
|
||||
spdlog::info("spdlog ok");
|
||||
return 0;
|
||||
}
|
||||
7
scripts/curated-snippets/sqlite3.cpp
Normal file
7
scripts/curated-snippets/sqlite3.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <sqlite3.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
std::println("sqlite3 ok: {}", sqlite3_libversion());
|
||||
return 0;
|
||||
}
|
||||
9
scripts/curated-snippets/tbb.cpp
Normal file
9
scripts/curated-snippets/tbb.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
int sum = 0;
|
||||
oneapi::tbb::parallel_for(0, 10, [&](int i) { sum += i; });
|
||||
std::println("tbb ok: {}", sum);
|
||||
return 0;
|
||||
}
|
||||
7
scripts/curated-snippets/zlib.cpp
Normal file
7
scripts/curated-snippets/zlib.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <zlib.h>
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
std::println("zlib ok: {}", zlibVersion());
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user