From 32934a9545295c0e59b4f740e7e6181eb03d8189 Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Tue, 24 Jul 2018 05:30:25 +0300 Subject: [PATCH] Add perl test harness to CMakeLists to run on make test --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 72fef26..6748f45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 2.8) project(ccgost C) +enable_testing() + if (CMAKE_C_COMPILER_ID MATCHES "Clang") message(STATUS "Using Clang and adding -Qunused-arguments flag") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments") @@ -93,6 +95,10 @@ set(GOST_ENGINE_SOURCE_FILES gost_md2012.c gost_pmeth.c) +add_test(NAME engine + COMMAND perl run_tests + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test) + add_library(gost STATIC ${GOST_LIB_SOURCE_FILES}) set_target_properties(gost PROPERTIES POSITION_INDEPENDENT_CODE ON) -- 2.39.5