From 5aa063cafdd0aa8eb0f3ddfe67c39f01cfa109a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Mon, 2 Nov 2020 22:31:19 +0100 Subject: [PATCH] Modify test target and add build instructions to readme --- README.MD | 5 +++++ test/CMakeLists.txt | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.MD b/README.MD index 9b1a92a..9e30437 100644 --- a/README.MD +++ b/README.MD @@ -7,3 +7,8 @@ If it is set, the lookup table will be moved to the section specified by the def ``#define BASE64_LOOKUP_TABLE_SECTION ".bss"`` This project is licensed under GPLv2. + +## Build Instructions + +* Type ``make`` to build the static library object. +* Type ``make execute-base64-test`` to build and run the tests diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 341d45c..a2b103e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,9 +1,9 @@ project(base64-test) -add_custom_target(test "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}" "-r compact" "-s" DEPENDS ${PROJECT_NAME}) +add_custom_target("execute-${PROJECT_NAME}" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}" "-r compact" "-s" DEPENDS ${PROJECT_NAME}) include_directories("${CMAKE_CURRENT_SOURCE_DIR}/catch-framework") aux_source_directory("src" TEST_SOURCES) -add_executable(${PROJECT_NAME} ${TEST_SOURCES}) +add_executable(${PROJECT_NAME} EXCLUDE_FROM_ALL ${TEST_SOURCES}) target_link_libraries(${PROJECT_NAME} base64-lib)