Skip to content

Instantly share code, notes, and snippets.

@Som1Lse
Som1Lse / build_system_bug.md
Last active Nov 1, 2020
A tale of a build system bug
View build_system_bug.md

A tale of a build system bug

Prologue

So, for a long time, I've had issues with GCC on Windows. It worked fine, on the first build, but whenever I made changes and wanted to build it again, I would get the following error message

ninja: error: FindFirstFileExA(c/:/path/to/project): The filename, directory name, or volume label syntax is incorrect.

and had to delete the contents of the build directory and build it again from scratch.

Obviously, that was too much of a hassle, so I just used MSVC and ignored it. Recently, I decided to look into it again, and hopefully fix it.

@Som1Lse
Som1Lse / is_constant_evaluated.md
Created Oct 11, 2019
The confusion with `std::is_constant_evaluated`, hopefully cleared up
View is_constant_evaluated.md

The confusion with std::is_constant_evaluated, hopefully cleared up

Disclaimer: I am not on the committee, and while I have done my due diligence, I could easily have missed something. This is also not an attack on anyone. As stated the confusion is quite understandable, and the talk mentioned generally does a good job of introducing some small features of C++20, even if it does contain a minor mistake.

Introduction

This is inspired by Timur Doumler's C++20: The small things given at CppCon 2019 where, at 48:00, somebody points out a mistake on

@Som1Lse
Som1Lse / deps.md
Last active May 23, 2019
CMake dependency flexibility
View deps.md

What we want to do

Lets say we have a library that is part of a larger CMake project, and we want to seperate it out so it can be used in more projects. For the sake of convenience lets say it is already largely seperate from the parent project, i.e. in its own directory with a CMakeLists.txt, and referenced with add_subdirectory from the parent project.

In order to fully seperate it we need to:

  1. Make it buildable on its own. If it has depencies, it needs to use find_package itself to find them. If it has