spaces and tabs, make tests belong to parent project again
[dueringa_WikiWalker.git] / test / CMakeLists.txt
bloba12adab883e1f431ebb2537fc00442abd0d73078
1 cmake_minimum_required(VERSION 2.8.11)
2 project(wikiwalker)
4 find_package(PkgConfig)
5 find_package(CURL REQUIRED)
6 pkg_check_modules(UT REQUIRED unittest++)
8 include_directories(
9         ${UT_INCLUDE_DIRS}
10         ${CURL_INCLUDE_DIRS}
11         ${CMAKE_CURRENT_SOURCE_DIR}/../lib/jsoncpp/
14 add_definitions(-std=c++11)
16 #ugly: have to specify sources again, and they will be built again
17 set( TESTED_SRCS
18         ${CMAKE_CURRENT_SOURCE_DIR}/../src/Article.cpp
19         ${CMAKE_CURRENT_SOURCE_DIR}/../src/ToJsonWriter.cpp
20         ${CMAKE_CURRENT_SOURCE_DIR}/../src/ToGraphvizWriter.cpp
21         ${CMAKE_CURRENT_SOURCE_DIR}/../src/CurlUrlCreator.cpp
22         ${CMAKE_CURRENT_SOURCE_DIR}/../src/JsonToArticleConverter.cpp
23         ${CMAKE_CURRENT_SOURCE_DIR}/../src/ArticleCollection.cpp
24         ${CMAKE_CURRENT_SOURCE_DIR}/../lib/jsoncpp/jsoncpp.cpp
27 # Define the CXX sources
28 set ( CXX_SRCS
29         ${CMAKE_CURRENT_SOURCE_DIR}/ArticleTests.cpp
30         ${CMAKE_CURRENT_SOURCE_DIR}/CollectionTests.cpp
31         ${CMAKE_CURRENT_SOURCE_DIR}/CurlUrlCreatorTests.cpp
32         ${CMAKE_CURRENT_SOURCE_DIR}/JsonToArticleConverterTests.cpp
33         ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
34         ${CMAKE_CURRENT_SOURCE_DIR}/ToGraphvizWriterTests.cpp
35         ${CMAKE_CURRENT_SOURCE_DIR}/ToJsonWriterTests.cpp
38 add_executable(run_tests
39         ${TESTED_SRCS}
40         ${CXX_SRCS}
43 target_link_libraries(run_tests
44         ${UT_LDFLAGS}
45         ${CURL_LIBRARIES}