From 8f910976672892bebbd78a5ee2406fc01d9ee068 Mon Sep 17 00:00:00 2001 From: woodser Date: Thu, 31 Aug 2023 11:21:19 -0400 Subject: [PATCH] document building and running tests, disable building tests by default --- CMakeLists.txt | 6 +++--- README.md | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7270f47..d0adf45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,9 +18,9 @@ endif() project(MoneroCppLibrary) set(BUILD_LIBRARY ON) -set(BUILD_SAMPLE ON) -set(BUILD_SCRATCHPAD ON) -set(BUILD_TESTS ON) +set(BUILD_SAMPLE OFF) +set(BUILD_SCRATCHPAD OFF) +set(BUILD_TESTS OFF) ################### # monero-project diff --git a/README.md b/README.md index e1b34bf..17b60ff 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,17 @@ For example, [monero-java](https://github.com/monero-ecosystem/monero-java) comp For 32 bit: `make release-static-win32` 10. Build as a shared library to ./build/: `cd ../../ && ./bin/build_libmonero_cpp.sh` +## Running sample code and tests + +1. In CMakeLists.txt, set the flags to build: + + set(BUILD_LIBRARY ON) + set(BUILD_SAMPLE ON) + set(BUILD_SCRATCHPAD ON) + set(BUILD_TESTS ON) +2. `./bin/build_libmonero_cpp.sh` +3. Run the app, for example: `./build/sample_code` + ## Related projects * [monero-java](https://github.com/monero-ecosystem/monero-java)