• Show log

    Commit

  • Hash : c13e56f9
    Author : Patrick Steinhardt
    Date : 2018-06-25T14:12:53

    cmake: distinguish internal and system include directories
    
    While we want to enforce strict C90 mode, this may cause issues with
    system provided header files which are themselves not strictly
    conforming. E.g. if a system header has C++ style comments, a compiler
    in strict C90 mode would produce an error and abort the build. As the
    user most likely doesn't want to change the system header, this would
    completely break the build on such systems. One example of this is
    mbedtls, which provides such header files.
    
    The problem can be worked around by distinguishing between
    system-provided and project-provided include directories. When adding
    include directories via "-isystem" instead of "-I", the compiler will
    skip certain checks and print out less warnings. To use system includes,
    we can simply add the "SYSTEM" flag to CMake's `INCLUDE_DIRECTORIES` and
    `TARGET_INCLUDE_DIRECTORIES` functions. Note that we have to split the
    include directories into two variables because of this, as we definitely
    still want to check for all warnings produced by our own header files.
    

  • README.md

  • Writing Clar tests for libgit2

    For information on the Clar testing framework and a detailed introduction please visit:

    https://github.com/vmg/clar

    • Write your modules and tests. Use good, meaningful names.

    • Make sure you actually build the tests by setting:

        cmake -DBUILD_CLAR=ON build/
    • Test:

        ./build/libgit2_clar
    • Make sure everything is fine.

    • Send your pull request. That’s it.