From 02889c87a0858b9af6dab685cb03f1e506611321 Mon Sep 17 00:00:00 2001
From: WolverinDEV <git@teaspeak.de>
Date: Thu, 4 Jul 2019 17:50:20 +0200
Subject: [PATCH] Added an option to disabled test building

---
 .gitignore     | 1 +
 CMakeLists.txt | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index b0601f8..bdc45bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 # Created by .ignore support plugin (hsz.mobi)
 cmake-build-debug/
 .idea/
+out/
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 60a5cf9..d52ebb6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,8 +39,11 @@ set(HEADERS
 
 add_library(ed25519 STATIC ${SOURCE} ${HEADERS})
 
-add_executable(ed25519_test test.c)
-target_link_libraries(ed25519_test ed25519)
+option(BUILD_TESTS "Build test" ON)
+if (BUILD_TESTS)
+	add_executable(ed25519_test test.c)
+	target_link_libraries(ed25519_test ed25519)
+endif ()
 
 if(USE_OPENSSL)
 	target_link_libraries(ed25519_test crypto)