Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix for GitHub's language detection #793
GitHub uses its linguist library to analyse repositories for the languages used in their source files. Based on what language occurs the most, the repository is marked as such. This leads to SFML being marked as a C library instead of a C++ library. The reason behind this is because the headers in the extlibs directory contribute a huge percentage of the overall lines of code in the repository, and they are... in C...
Not too long ago, linguist added a way for repositories to mark directories that aren't already part of their exclusion list to be ignored.
This change will make SFML show up as a C++ library on GitHub.
But.... it's just a pair of headers? So... no compilation needed? Not to mention that if it is put into extlibs, the newline normalization won't get applied to it as well, just like the other extlibs headers.
And about easy: I don't think it is much easier the way it is now. All that has to be changed is the location of the files and the CMakeLists.txt inside Graphics.
If you agree, I can submit another PR to get it moved into extlibs alongside all the other headers. No extra compilation required.
The way he does it is weird: it's a single header that contains both functions declarations and definitions. And you can define a macro if you just want one or the other. So it is compiled, but since it's only used in a single file (ImageLoader.cpp) we don't have to play with these macros, it is just included and compiled there.
But yes, I guess it could be moved to the extlib headers anyway.