[SCM] pam wrapper repository - branch master updated

Andreas Schneider asn at samba.org
Mon Feb 27 09:45:37 UTC 2023


The branch, master has been updated
       via  8e94874 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode
       via  9e7f8ac cmake: Drop FindCMocka.cmake Module
      from  2b486d5 Drop support for Python 2

https://git.samba.org/?p=pam_wrapper.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 8e94874bf5c0d569a16985eafa9922d8c527a9fb
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 17 17:51:27 2023 +0100

    cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>

commit 9e7f8ac9ee1f968ac8af2d9c2e9dbd91a3090b73
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Feb 17 18:08:45 2023 +0100

    cmake: Drop FindCMocka.cmake Module
    
    We should use config mode.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 cmake/Modules/FindCMocka.cmake | 49 ------------------------------------------
 tests/CMakeLists.txt           |  4 ++++
 2 files changed, 4 insertions(+), 49 deletions(-)
 delete mode 100644 cmake/Modules/FindCMocka.cmake


Changeset truncated at 500 lines:

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 at 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)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 9d56f21..26f2da2 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,5 +1,9 @@
 project(tests C)
 
+if (TARGET cmocka::cmocka)
+    set(CMOCKA_LIBRARY cmocka::cmocka)
+endif()
+
 set(PAM_MATRIX_PATH "${CMAKE_BINARY_DIR}/src/modules/pam_matrix.so")
 
 configure_file(services/matrix.in ${CMAKE_CURRENT_BINARY_DIR}/services/matrix @ONLY)


-- 
pam wrapper repository



More information about the samba-cvs mailing list