Skip to content

Commit

Permalink
reverting CMake file changes (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yao Yue authored Jun 27, 2019
1 parent dea5bee commit b117632
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,16 @@ endif(COVERAGE)
include(FindPackageHandleStandardArgs)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")

find_package(PkgConfig QUIET)

if(PKG_CONFIG_FOUND)
pkg_check_modules(CHECK QUIET check>=0.10)
endif()

find_package(Check)
if(NOT CHECK_FOUND)
find_package(Check QUIET 0.10)
endif()
message(WARNING "Check is required to build and run tests")
endif(NOT CHECK_FOUND)
if(CHECK_FOUND)
check_symbol_exists(ck_assert_int_eq check.h CHECK_WORKING)
if(NOT CHECK_WORKING)
message(WARNING "Check version too old to build tests")
endif(NOT CHECK_WORKING)
endif(CHECK_FOUND)

find_package(Threads)

Expand All @@ -165,10 +166,10 @@ include_directories(

add_subdirectory(src)

if(CHECK_FOUND)
include_directories(${include_directories} ${CHECK_INCLUDES})
if(CHECK_WORKING)
include_directories(${include_directories} "${CHECK_INCLUDES}")
add_subdirectory(test)
endif(CHECK_FOUND)
endif(CHECK_WORKING)


if(HAVE_RUST)
Expand All @@ -192,4 +193,4 @@ message(STATUS "HAVE_SIGNAME: " ${HAVE_SIGNAME})

message(STATUS "HAVE_BACKTRACE: " ${HAVE_BACKTRACE})

message(STATUS "CHECK_FOUND: " ${CHECK_FOUND})
message(STATUS "CHECK_WORKING: " ${CHECK_WORKING})

0 comments on commit b117632

Please sign in to comment.