mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-18 14:59:09 +00:00
Moved testing resources to clar, and removed old tests directory.
Removed the BUILD_CLAR CMake flag, and updated the readme.
This commit is contained in:
parent
270303ca7a
commit
fd29cd13b7
@ -51,8 +51,7 @@ SET(INSTALL_INC include CACHE PATH "Where to install headers to.")
|
|||||||
# Build options
|
# Build options
|
||||||
OPTION (BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
|
OPTION (BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
|
||||||
OPTION (THREADSAFE "Build libgit2 as threadsafe" OFF)
|
OPTION (THREADSAFE "Build libgit2 as threadsafe" OFF)
|
||||||
OPTION (BUILD_TESTS "Build Tests" ON)
|
OPTION (BUILD_CLAR "Build Tests using the Clar suite" ON)
|
||||||
OPTION (BUILD_CLAR "Build Tests using the Clar suite" OFF)
|
|
||||||
OPTION (TAGS "Generate tags" OFF)
|
OPTION (TAGS "Generate tags" OFF)
|
||||||
|
|
||||||
# Platform specific compilation flags
|
# Platform specific compilation flags
|
||||||
@ -128,29 +127,10 @@ INSTALL(DIRECTORY include/git2 DESTINATION ${INSTALL_INC} )
|
|||||||
INSTALL(FILES include/git2.h DESTINATION ${INSTALL_INC} )
|
INSTALL(FILES include/git2.h DESTINATION ${INSTALL_INC} )
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
IF (BUILD_TESTS)
|
|
||||||
SET(TEST_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/tests/resources" CACHE PATH "Path to test resources.")
|
|
||||||
ADD_DEFINITIONS(-DTEST_RESOURCES=\"${TEST_RESOURCES}\")
|
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(tests)
|
|
||||||
FILE(GLOB SRC_TEST tests/t??-*.c)
|
|
||||||
|
|
||||||
ADD_EXECUTABLE(libgit2_test tests/test_main.c tests/test_lib.c tests/test_helpers.c ${SRC} ${SRC_TEST} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX})
|
|
||||||
TARGET_LINK_LIBRARIES(libgit2_test ${CMAKE_THREAD_LIBS_INIT})
|
|
||||||
IF (WIN32)
|
|
||||||
TARGET_LINK_LIBRARIES(libgit2_test ws2_32)
|
|
||||||
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
|
|
||||||
TARGET_LINK_LIBRARIES(libgit2_test socket nsl)
|
|
||||||
ENDIF ()
|
|
||||||
|
|
||||||
ENABLE_TESTING()
|
|
||||||
ADD_TEST(libgit2_test libgit2_test)
|
|
||||||
ENDIF ()
|
|
||||||
|
|
||||||
IF (BUILD_CLAR)
|
IF (BUILD_CLAR)
|
||||||
FIND_PACKAGE(PythonInterp REQUIRED)
|
FIND_PACKAGE(PythonInterp REQUIRED)
|
||||||
|
|
||||||
SET(CLAR_FIXTURES "${CMAKE_CURRENT_SOURCE_DIR}/tests/resources/")
|
SET(CLAR_FIXTURES "${CMAKE_CURRENT_SOURCE_DIR}/tests-clar/resources/")
|
||||||
SET(CLAR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/tests-clar")
|
SET(CLAR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/tests-clar")
|
||||||
ADD_DEFINITIONS(-DCLAR_FIXTURE_PATH=\"${CLAR_FIXTURES}\")
|
ADD_DEFINITIONS(-DCLAR_FIXTURE_PATH=\"${CLAR_FIXTURES}\")
|
||||||
|
|
||||||
|
@ -68,8 +68,7 @@ The following CMake variables are declared:
|
|||||||
- `INSTALL_LIB`: Where to install libraries to.
|
- `INSTALL_LIB`: Where to install libraries to.
|
||||||
- `INSTALL_INC`: Where to install headers to.
|
- `INSTALL_INC`: Where to install headers to.
|
||||||
- `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON)
|
- `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON)
|
||||||
- `BUILD_TESTS`: Build the libgit2 test suite (defaults to ON)
|
- `BUILD_CLAR`: Build [Clar](https://github.com/tanoku/clar)-based test suite (defaults to ON)
|
||||||
- `BUILD_CLAR`: Build [Clar](https://github.com/tanoku/clar)-based test suite (defaults to OFF)
|
|
||||||
- `THREADSAFE`: Build libgit2 with threading support (defaults to OFF)
|
- `THREADSAFE`: Build libgit2 with threading support (defaults to OFF)
|
||||||
|
|
||||||
Language Bindings
|
Language Bindings
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user