project(unit_tests)
find_package(MPI)
find_package(Boost REQUIRED COMPONENTS program_options filesystem unit_test_framework system)

add_definitions(-DTEST_DATA_DIR="${PROJECT_SOURCE_DIR}/test_data/")

#if(MPI_FOUND)
#	add_executable( parallel_tests parallel.cpp)
#endif(MPI_FOUND)

include_directories(${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS})

include_directories (${Matrices_SOURCE_DIR})
link_directories(${Matrices_BINARY_DIR})

include_directories (${Comparator_SOURCE_DIR})
link_directories(${Comparator_BINARY_DIR})

add_subdirectory(test_utils)
add_subdirectory(evaluator_tests)
add_subdirectory(matrices_tests)
add_subdirectory(comparator_tests)
set(dependencies test-all test-matrices test-comparator test-evaluator) 
IF(Corpus2_LIBRARY)
	add_subdirectory(architect2_tests)
	set(dependencies ${dependencies} test-architect2)
ENDIF(Corpus2_LIBRARY)
add_custom_target(test-all)
add_dependencies(${dependencies})
