aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2014-12-01 20:01:31 +0200
committerRiccardo Spagni <ric@spagni.net>2014-12-01 20:01:36 +0200
commit7935e49529dfe8139b8a5f34cb17700142319aa8 (patch)
tree305c92c2a251f0889ab1378a79dbb18e54f6685c
parentupdated readme to include libevent / libgtest deps (diff)
parentdon't build tests unless we're building all-* or *-test builds (diff)
downloadmonero-7935e49529dfe8139b8a5f34cb17700142319aa8.tar.xz
Merge pull request #191
685dd4a don't build tests unless we're building all-* or *-test builds (Riccardo Spagni)
-rw-r--r--CMakeLists.txt5
-rw-r--r--Makefile16
2 files changed, 15 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ebca5c6fb..ee7bebdd9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -251,4 +251,7 @@ endif()
include(version.cmake)
add_subdirectory(src)
-add_subdirectory(tests)
+
+if(BUILD_TESTS)
+ add_subdirectory(tests)
+endif() \ No newline at end of file
diff --git a/Makefile b/Makefile
index 8a4e7a75e..ae3378da2 100644
--- a/Makefile
+++ b/Makefile
@@ -8,9 +8,12 @@ build-debug: cmake-debug
cd build/debug && $(MAKE)
test-debug: build-debug
- cd build/debug && $(MAKE) test
+ mkdir -p build/debug
+ cd build/debug && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Debug ../.. && $(MAKE) test
-all-debug: build-debug
+all-debug:
+ mkdir -p build/debug
+ cd build/debug && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Debug ../.. && $(MAKE)
cmake-release:
mkdir -p build/release
@@ -20,13 +23,16 @@ build-release: cmake-release
cd build/release && $(MAKE)
test-release: build-release
- cd build/release && $(MAKE) test
+ mkdir -p build/release
+ cd build/release && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE) test
-all-release: build-release
+all-release:
+ mkdir -p build/release
+ cd build/release && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE)
release-static:
mkdir -p build/release
- cd build/release && cmake -D STATIC=ON -D ARCH="x86-64" -D CMAKE_BUILD_TYPE=Release ../.. && $(MAKE)
+ cd build/release && cmake -D STATIC=ON -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE)
clean:
@echo "WARNING: Back-up your wallet if it exists within ./build!" ; \