From 40ae07dc9c8bea45c7fea6b8ad39f3b5e5a65c6e Mon Sep 17 00:00:00 2001 From: Mori Bellamy Date: Thu, 16 Nov 2023 16:59:36 -0800 Subject: [PATCH] set up ctest --- .github/workflows/cmake-multi-platform.yml | 1 - .idea/vcs.xml | 4 ---- CMakeLists.txt | 8 +++++++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index e995f98..b11ab90 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -59,7 +59,6 @@ jobs: # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > cmake -B ${{ steps.strings.outputs.build-output-dir }} - -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S ${{ github.workspace }} diff --git a/.idea/vcs.xml b/.idea/vcs.xml index e16eaf8..35eb1dd 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,9 +2,5 @@ - - - - \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index fa09289..4edc400 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@ cmake_minimum_required(VERSION 3.26) project(mousewallet C) +enable_testing() set(CMAKE_C_STANDARD 90) set(CMAKE_C_EXTENSIONS OFF) @@ -10,7 +11,10 @@ if (NOT CMAKE_BUILD_TYPE) endif () # Configure external deps -set(BUILD_SHARED_LIBS OFF) # static linkage +set(BUILD_SHARED_LIBS OFF) +set(SECP256K1_BUILD_TESTS OFF) +set(SECP256K1_BUILD_EXHAUSTIVE_TESTS OFF) +set(SECP256K1_BUILD_CTIME_TESTS OFF) add_subdirectory("vendor/secp256k1") add_library(argparse STATIC vendor/argparse/argparse.c) add_library(sha3 STATIC vendor/SHA3IUF/sha3.c) @@ -27,3 +31,5 @@ target_link_libraries(mousewallet PRIVATE argparse lib) # Test add_executable(test_mousewallet src/tests.c) target_link_libraries(test_mousewallet PRIVATE lib) + +add_test(NAME MousewalletTest COMMAND test_mousewallet) \ No newline at end of file