diff options
Diffstat (limited to 'src/components/security_manager/test/CMakeLists.txt')
-rw-r--r-- | src/components/security_manager/test/CMakeLists.txt | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/components/security_manager/test/CMakeLists.txt b/src/components/security_manager/test/CMakeLists.txt index ba1fbcca8b..6707e5ea5a 100644 --- a/src/components/security_manager/test/CMakeLists.txt +++ b/src/components/security_manager/test/CMakeLists.txt @@ -28,8 +28,8 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake) - +if (BUILD_TESTS) + include_directories( ${GMOCK_INCLUDE_DIRECTORY} ${COMPONENTS_DIR}/protocol_handler/test/include @@ -39,15 +39,20 @@ include_directories( ${JSONCPP_INCLUDE_DIRECTORY} ) -collect_sources(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}") +set(SOURCES + ${COMPONENTS_DIR}/security_manager/test/crypto_manager_impl_test.cc + ${COMPONENTS_DIR}/security_manager/test/security_manager_test.cc + ${COMPONENTS_DIR}/security_manager/test/security_query_test.cc + ${COMPONENTS_DIR}/security_manager/test/security_query_matcher.cc + ${COMPONENTS_DIR}/security_manager/test/ssl_context_test.cc + ${COMPONENTS_DIR}/security_manager/test/ssl_certificate_handshake_test.cc + ) set(LIBRARIES gmock ${SecurityManagerLibrary} ) -create_test (security_manager_test "${SOURCES}" "${LIBRARIES}") - set(CERT_LIST ${CMAKE_SOURCE_DIR}/mycert.pem ${CMAKE_SOURCE_DIR}/mykey.pem @@ -59,8 +64,11 @@ add_custom_target(generate_certificates WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) -foreach(CERT_ENTRY ${CERT_LIST}) - file(COPY ${CERT_ENTRY} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -endforeach() +foreach( file_i ${CERT_LIST}) + file(COPY ${file_i} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +endforeach( file_i ) +create_test (security_manager_test "${SOURCES}" "${LIBRARIES}") add_dependencies(security_manager_test generate_certificates) + +endif () |