From ba9071753a0f74836d36bca7ed4b8f1c84181ad7 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Thu, 21 Aug 2014 12:10:48 +0200 Subject: [PATCH] Fix make test --- CMakeLists.txt | 5 +++++ src/CMakeLists.txt | 2 -- src/tests/CMakeLists.txt | 5 ----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca77e16c6..50a870d7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -421,6 +421,11 @@ ADD_SUBDIRECTORY( thirdparty ) ADD_SUBDIRECTORY( src ) ADD_SUBDIRECTORY( admin ) +IF(BUILD_TESTS) + enable_testing() + ADD_SUBDIRECTORY( src/tests ) +ENDIF() + # Add all targets to the build-tree export set set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Tomahawk" CACHE PATH "Installation directory for CMake files") set(CMAKE_INSTALL_FULL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 84b48402a..f64f16582 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -26,5 +26,3 @@ if(WITH_CRASHREPORTER) add_subdirectory( crashreporter ) endif() -# tests -add_subdirectory( tests ) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index a02772c55..397d31af3 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -1,13 +1,8 @@ -if( BUILD_TESTS ) setup_qt() -enable_testing() - include_directories(${CMAKE_CURRENT_LIST_DIR}/../src/tomahawk ${CMAKE_CURRENT_LIST_DIR}/../src/libtomahawk) include(tomahawk_add_test.cmake) tomahawk_add_test(Result) tomahawk_add_test(Query) tomahawk_add_test(Database) - -endif()