aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2019-07-06 23:01:10 -0400
committerDeterminant <ted.sybil@gmail.com>2019-07-06 23:01:10 -0400
commita442616edf97dc65f6e768d249eb318fa317c747 (patch)
tree785fb67feaf7018e0bd22b28af01e988a895008f /CMakeLists.txt
parentb5d5e8375373eaed6a5544860336a74bbd96446d (diff)
move the demo app to examples/
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 6 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f93b944..c6af4bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,19 +79,16 @@ option(HOTSTUFF_PROTO_LOG "enable protocol log" OFF)
option(HOTSTUFF_MSG_STAT "eanble message statistics" ON)
option(HOTSTUFF_BLK_PROFILE "enable block profiling" OFF)
option(HOTSTUFF_TWO_STEP "use two-step HotStuff (instead of three-step HS)" OFF)
+option(BUILD_EXAMPLES "build examples" ON)
configure_file(src/config.h.in include/hotstuff/config.h @ONLY)
-# add executables
-
-add_executable(hotstuff-app
- src/hotstuff_app.cpp)
-target_link_libraries(hotstuff-app hotstuff_static)
-
-add_executable(hotstuff-client
- src/hotstuff_client.cpp)
-target_link_libraries(hotstuff-client hotstuff_static)
+# build examples
+if(BUILD_EXAMPLES)
+ add_subdirectory(examples)
+endif()
+# build tools
add_executable(hotstuff-keygen
src/hotstuff_keygen.cpp)
target_link_libraries(hotstuff-keygen hotstuff_static)