1. 23 Oct, 2017 4 commits
  2. 20 Oct, 2017 2 commits
    • Merge pull request #4382 from pks-t/pks/cmake-source-dir · 8f05d2d8
      cmake: use project-relative binary and source directories
      Edward Thomson committed
    • cmake: use project-relative binary and source directories · 4da74c83
      Due to our split of CMake files into multiple modules, we had to replace
      some uses of the `${CMAKE_CURRENT_SOURCE_DIR}` and
      `${CMAKE_CURRENT_BINARY_DIR}` variables and replace them with
      `${CMAKE_SOURCE_DIR}` and `${CMAKE_BINARY_DIR}`. This enabled us to
      still be able to refer to top-level files when defining build
      instructions inside of a subdirectory.
      
      When replacing all variables, it was assumed that the absolute set of
      variables is always relative to the current project. But in fact, this
      is not the case, as these variables always point to the source and
      binary directory as given by the top-levl project. So the change
      actually broke the ability to include libgit2 directly as a subproject,
      as source files cannot be found anymore.
      
      Fix this by instead using project-specific source and binary directories
      with `${libgit2_SOURCE_DIR}` and `${libgit2_BINARY_DIR}`.
      Patrick Steinhardt committed
  3. 19 Oct, 2017 1 commit
  4. 14 Oct, 2017 1 commit
  5. 09 Oct, 2017 9 commits
  6. 07 Oct, 2017 7 commits
  7. 06 Oct, 2017 9 commits
  8. 04 Oct, 2017 1 commit
  9. 28 Sep, 2017 2 commits
  10. 27 Sep, 2017 3 commits
  11. 22 Sep, 2017 1 commit
    • cmake: use static dependencies when building static libgit2 · 49551254
      CMake allows us to build a static library by simply setting the variable
      `BUILD_SHARED_LIBS` to `OFF`. While this causes us to create a static
      libgit2.a archive, it will not automatically cause CMake to only locate
      static archives when searching for dependencies. This does no harm in
      case of building our libgit2.a, as we do not want to include all
      required dependencies in the resulting archive anyway. Instead, we ask
      users of a static libgit2.a to link against the required set of static
      archives themselves, typically aided by the libgit2.pc file.
      
      Where it does cause harm, though, is when we build the libgit2_clar test
      suite. CMake has happily populated our LIBGIT2_LIBS variable with shared
      libraries, and so linking the final libgit2_clar test does not do the
      right thing. It will simply ignore those shared libraries, we end up
      with a test suite with undefined symbols.
      
      To fix the issue, we can instruct CMake to only locate libraries with a
      certain suffix. As static libraries are typically identifiable by their
      ".a" suffix on Unix-based systems, we can instruct CMake to only locate
      libraries with this suffix to restrict it from finding any shared
      libraries. This fixes building a static libgit2_clar test suite.
      
      Note that this ignores the problem on Windows. The problem here is that
      we cannot even distinguish static and dynamic libraries by only
      inspecting their suffix. So we just ignore the problem on Windows, for
      now.
      Patrick Steinhardt committed