summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt41
2 files changed, 25 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index a63d1a4..8f13ade 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@ Thumbs.db
# Distutils/pip files
build
+build_release
*.egg-info
# Compiled source
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cdc6d0e..2f364e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,20 +39,27 @@ target_link_libraries(simpl ${libs})
install(TARGETS simpl LIBRARY DESTINATION lib)
install(FILES ${include_files} DESTINATION include/simpl)
-# tests
-set(test_base_src ${source_files} tests/test_base.cpp)
-set(test_peak_detection_src ${source_files} tests/test_peak_detection.cpp)
-set(test_partial_tracking_src ${source_files} tests/test_partial_tracking.cpp)
-set(test_synthesis_src ${source_files} tests/test_synthesis.cpp)
-
-LIST(APPEND libs cppunit sndfile)
-
-add_executable(test_base ${test_base_src})
-add_executable(test_peak_detection ${test_peak_detection_src})
-add_executable(test_partial_tracking ${test_partial_tracking_src})
-add_executable(test_synthesis ${test_synthesis_src})
-
-target_link_libraries(test_base ${libs})
-target_link_libraries(test_peak_detection ${libs})
-target_link_libraries(test_partial_tracking ${libs})
-target_link_libraries(test_synthesis ${libs})
+
+# ----------------------------------------------------------------------------
+# Tests
+# ----------------------------------------------------------------------------
+if(BUILD_TESTS)
+ set(test_base_src ${source_files} tests/test_base.cpp)
+ set(test_peak_detection_src ${source_files} tests/test_peak_detection.cpp)
+ set(test_partial_tracking_src ${source_files} tests/test_partial_tracking.cpp)
+ set(test_synthesis_src ${source_files} tests/test_synthesis.cpp)
+
+ LIST(APPEND libs cppunit sndfile)
+
+ add_executable(test_base ${test_base_src})
+ add_executable(test_peak_detection ${test_peak_detection_src})
+ add_executable(test_partial_tracking ${test_partial_tracking_src})
+ add_executable(test_synthesis ${test_synthesis_src})
+
+ target_link_libraries(test_base ${libs})
+ target_link_libraries(test_peak_detection ${libs})
+ target_link_libraries(test_partial_tracking ${libs})
+ target_link_libraries(test_synthesis ${libs})
+else()
+ message("-- Not building tests. To change run CMake with -D BUILD_TESTS=yes")
+endif()