deps/http-parser/CMakeLists.txt


Log

Author Commit Date CI Message
Patrick Steinhardt cacbf998 2018-06-22T13:41:17 deps: fix implicit fallthrough warning in http-parser GCC 7 has introduced new warnings for implicit fallthrough in switch statements. Whenever there is no branch in a case block, GCC will watch out for some heuristics which indicate that the implicit fallthrough is intended, like a "fallthrough" comment. The third-party http-parser code manages to trick this heuristic in one case, even though there is a "FALLTHROUGH" comment. Fortunately, GCC has also added a strictness level to the -Wimplicit-fallthrough diagnostic, such that we can loosen this heuristic and make it more lax. Set -Wimplicit-fallthrough=1 in http-parser's CMake build instructions, which is the strictest level that gets rid of the warning. This level will treat any kind of comment as a "fallthrough" comment, which silences the warning.
Patrick Steinhardt 8c19969a 2017-09-06T07:38:48 cmake: fix static linking for bundled deps Our bundled deps are being built as simple static libraries which are then linked into the libgit2 library via `TARGET_LINK_LIBRARIES`. While this works for a dynamically built libgit2 library, using this function to link two static libraries does not have the expected outcome of merging those static libraries into one big library. This leads to symbols of our bundled deps being undefined in the resulting libgit2 archive. As we have bumped our minimum CMake version to 2.8.11, we can now easily make use of object libraries for our bundled dependencies. So build instructions are still self-contained inside of the dependency directories and the resulting object libraries can just be added to the LIBGIT2_OBJECTS list, which will cause them to be linked into the final resulting static library. This fixes the issue of undefined symbols.
Patrick Steinhardt b7514554 2017-06-28T13:25:09 cmake: move http-parser build instructions into subdirectory Extract code required to build the http-parser library into its own CMakeLists.txt, which is included as required.