Unverified Commit b2d1ad64 authored by Michael Grunder's avatar Michael Grunder Committed by GitHub
Browse files

Merge pull request #727 from pbotros/botros/disable-tests-cmake

Adding an option to DISABLE_TESTS
parents f2ef5f0c f052fd1a
...@@ -3,6 +3,7 @@ INCLUDE(GNUInstallDirs) ...@@ -3,6 +3,7 @@ INCLUDE(GNUInstallDirs)
PROJECT(hiredis) PROJECT(hiredis)
OPTION(ENABLE_SSL "Build hiredis_ssl for SSL support" OFF) OPTION(ENABLE_SSL "Build hiredis_ssl for SSL support" OFF)
OPTION(DISABLE_TESTS "If tests should be compiled or not" OFF)
MACRO(getVersionBit name) MACRO(getVersionBit name)
SET(VERSION_REGEX "^#define ${name} (.+)$") SET(VERSION_REGEX "^#define ${name} (.+)$")
...@@ -76,7 +77,7 @@ IF(ENABLE_SSL) ...@@ -76,7 +77,7 @@ IF(ENABLE_SSL)
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
ENDIF() ENDIF()
IF(NOT (WIN32 OR MINGW)) IF(NOT (DISABLE_TESTS OR (WIN32 OR MINGW)))
ENABLE_TESTING() ENABLE_TESTING()
ADD_EXECUTABLE(hiredis-test test.c) ADD_EXECUTABLE(hiredis-test test.c)
TARGET_LINK_LIBRARIES(hiredis-test hiredis) TARGET_LINK_LIBRARIES(hiredis-test hiredis)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment