forked from chaoskao/sonic-pam-tacacs-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·41 lines (31 loc) · 1.22 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
PROJECT(test)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR)
set(PAM_TACPLUS_TEST_DIR ${CMAKE_SOURCE_DIR}/tests/)
set(PAM_TACPLUS_DIR ${CMAKE_SOURCE_DIR}/client)
set(PAM_LIBTAC_DIR ${CMAKE_SOURCE_DIR}/client/include)
set(PAM_TACPLUS_LIB ${CMAKE_SOURCE_DIR}/client/lib/security)
set(CMAKE_CXX_FLAGS "-std=c++11 -O3 -fpermissive")
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
INCLUDE_DIRECTORIES(
${PAM_LIBTAC_DIR}
${PROJECT_BINARY_DIR}
)
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
find_package(Gtest REQUIRED)
configure_file (
tests/config.h.in
${PROJECT_BINARY_DIR}/config.h
)
ADD_EXECUTABLE(pam_tacplus_integration_test
${PAM_TACPLUS_TEST_DIR}/pam_tacplus_integration_test.cpp
)
TARGET_LINK_LIBRARIES(pam_tacplus_integration_test
gmock gtest gtest_main pthread ${CMAKE_SOURCE_DIR}/client/lib/security/pam_tacplus.so ${CMAKE_SOURCE_DIR}/client/lib/libtac.so pam crypto
)
ADD_EXECUTABLE(pam_tacplus_unit_test
${PAM_TACPLUS_TEST_DIR}/pam_tacplus_unit_test.cpp
)
TARGET_LINK_LIBRARIES(pam_tacplus_unit_test
gmock gtest gtest_main pthread ${CMAKE_SOURCE_DIR}/client/lib/security/pam_tacplus.so ${CMAKE_SOURCE_DIR}/client/lib/libtac.so pam crypto
)
include(CTest)