diff options
author | Andreas Schneider <asn@samba.org> | 2014-05-22 08:49:07 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-05-22 15:02:25 +0200 |
commit | 71cc17ad79e186717c5e565369b860c0cc2f2d77 (patch) | |
tree | 0c4fe887a82c39a5b98d58535db2d4a263d5eba9 | |
parent | 916a02d1f155c98f689e5ebb545331dc0f48ac2a (diff) | |
download | socket_wrapper-71cc17ad79e186717c5e565369b860c0cc2f2d77.tar.gz socket_wrapper-71cc17ad79e186717c5e565369b860c0cc2f2d77.tar.xz socket_wrapper-71cc17ad79e186717c5e565369b860c0cc2f2d77.zip |
cmake: Require cmocka versin 0.4.1.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r-- | CMakeLists.txt | 7 | ||||
-rw-r--r-- | cmake/Modules/FindCMocka.cmake | 49 |
2 files changed, 4 insertions, 52 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 33c2245..8e346e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,9 +51,10 @@ configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) add_subdirectory(src) if (UNIT_TESTING) - find_package(CMocka REQUIRED) - include(AddCMockaTest) - add_subdirectory(tests) + find_package(cmocka 0.4.1 REQUIRED) + + include(AddCMockaTest) + add_subdirectory(tests) endif (UNIT_TESTING) # pkg-config file diff --git a/cmake/Modules/FindCMocka.cmake b/cmake/Modules/FindCMocka.cmake deleted file mode 100644 index 2dd9fc5..0000000 --- a/cmake/Modules/FindCMocka.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# - Try to find CMocka -# Once done this will define -# -# CMOCKA_ROOT_DIR - Set this variable to the root installation of CMocka -# -# Read-Only variables: -# CMOCKA_FOUND - system has CMocka -# CMOCKA_INCLUDE_DIR - the CMocka include directory -# CMOCKA_LIBRARIES - Link these to use CMocka -# CMOCKA_DEFINITIONS - Compiler switches required for using CMocka -# -#============================================================================= -# Copyright (c) 2011-2012 Andreas Schneider <asn@cryptomilk.org> -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# - -find_path(CMOCKA_INCLUDE_DIR - NAMES - cmocka.h - PATHS - ${CMOCKA_ROOT_DIR}/include -) - -find_library(CMOCKA_LIBRARY - NAMES - cmocka - PATHS - ${CMOCKA_ROOT_DIR}/include -) - -if (CMOCKA_LIBRARY) - set(CMOCKA_LIBRARIES - ${CMOCKA_LIBRARIES} - ${CMOCKA_LIBRARY} - ) -endif (CMOCKA_LIBRARY) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(CMocka DEFAULT_MSG CMOCKA_LIBRARIES CMOCKA_INCLUDE_DIR) - -# show the CMOCKA_INCLUDE_DIR and CMOCKA_LIBRARIES variables only in the advanced view -mark_as_advanced(CMOCKA_INCLUDE_DIR CMOCKA_LIBRARIES) |