forked from emacsorphanage/libegit2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
31 lines (25 loc) · 875 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cmake_minimum_required(VERSION 3.0)
enable_language(C)
project(elibgit2)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE CACHE BOOL "pic" FORCE)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "shared" FORCE)
set(BUILD_CLAR OFF CACHE BOOL "clar" FORCE)
add_subdirectory(libgit2)
find_library(git2 libgit2.a)
add_subdirectory(src)
enable_testing()
# NOTE: These test names must be replicated in .appveyor-script.ps1
# for the Windows CI. Fixing this is still TODO.
set(EGIT_TESTS
blame branch commit config ignore index refcount
reference repository signature status tree)
foreach(test ${EGIT_TESTS})
add_test(NAME libegit2_${test} COMMAND
emacs --batch
-L "${CMAKE_CURRENT_BINARY_DIR}"
-L "${CMAKE_CURRENT_SOURCE_DIR}/test"
-l libegit2
-l test-helper
-l ${test}-test
-f ert-run-tests-batch-and-exit)
endforeach(test)