Skip to content

Instantly share code, notes, and snippets.

Mateusz Janek stryku

Block or report user

Report or block stryku

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
stryku / CMakeSL builds
Last active Oct 7, 2019
CMakeSL fully builds itself for the first time
View CMakeSL builds

CMakeSL builds itself \o/

tl;dr: CMakeSL is now able to build itself. Read along to find out what changes have been made since last reddit post and a short video from CMakeSL building.


View CMakeSL - abseil-cpp


  • CMakeSL RSS - I'm going to reuse my page feed. I'm not going to post every article at r/cpp or r/cmake, so if you want to be notified about new CMakeSL arts, the RSS is the only reliable way.
  • CMakeSL repo

CMakeSL - abseil-cpp scripts

This article is meant to present what's going on with the CMakeSL project. If you don't know what the CMakeSL is, check out this gist or the readme.

CMakeSL changes

stryku /
Last active May 8, 2019
CMakeSL (CMake Scripting Language) - An attempt to introduce a new scripting language for CMake

CMakeSL (CMake Scripting Language) - An attempt to introduce a new scripting language for CMake


  • Abstract
  • Video
  • Why
  • How
  • Current status
  • Future plans
  • How to
View recursive-clang-format_5.diff
diff --git a/tools/clang-format/ClangFormat.cpp b/tools/clang-format/ClangFormat.cpp
index 37c2d8b78f..ff71b4aac8 100644
--- a/tools/clang-format/ClangFormat.cpp
+++ b/tools/clang-format/ClangFormat.cpp
@@ -22,6 +22,7 @@
#include "clang/Rewrite/Core/Rewriter.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
+#include "llvm/Support/Regex.h"
#include "llvm/Support/Signals.h"
View recursive-clang-format_4.cpp
for every listed file
for every passed regex
if file name match regex
format shit out
View recursive-clang-format_3.cpp
static cl::opt<bool> Recursively("r",
cl::desc("Recursively search for <file>s."),
View recursive-clang-format_2.cpp
if (Recursively) {
return clang::format::formatRecusively();
View recursive-clang-format_1.cpp
static bool formatRecusively() {
std::vector<std::string> files;
if (checkMultipleFilesPreconditions() || findMatchingFiles(files)) {
return false;
bool Error = false;
for (unsigned i = 0; i < files.size(); ++i) {
Error |= clang::format::format(files[i]);
View recursive-clang-format_0.cpp
bool findMatchingFiles(std::vector<std::string> &files)
SmallVector<char, 256> currentPath;
std::error_code ec;
llvm::sys::fs::file_status fileStatus;
for (llvm::sys::fs::recursive_directory_iterator I(currentPath, ec), E;
I != E; I.increment(ec)) {
if (ec) {
View generic_tostring_7.cpp
#include <iostream>
#include <string>
#include <utility>
#include <type_traits>
auto toString(bool b)
return b ? "true" : "false";
You can’t perform that action at this time.