summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/tests/CMakeLists.txt16
-rw-r--r--src/tests/tests.cpp9
3 files changed, 26 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index de4fe716a..1e1245160 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -5,6 +5,7 @@ add_subdirectory(common)
5add_subdirectory(core) 5add_subdirectory(core)
6add_subdirectory(video_core) 6add_subdirectory(video_core)
7add_subdirectory(audio_core) 7add_subdirectory(audio_core)
8add_subdirectory(tests)
8if (ENABLE_SDL2) 9if (ENABLE_SDL2)
9 add_subdirectory(citra) 10 add_subdirectory(citra)
10endif() 11endif()
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
new file mode 100644
index 000000000..457c55571
--- /dev/null
+++ b/src/tests/CMakeLists.txt
@@ -0,0 +1,16 @@
1set(SRCS
2 tests.cpp
3 )
4
5set(HEADERS
6 )
7
8create_directory_groups(${SRCS} ${HEADERS})
9
10include_directories(../../externals/catch/single_include/)
11
12add_executable(tests ${SRCS} ${HEADERS})
13target_link_libraries(tests core video_core audio_core common)
14target_link_libraries(tests ${PLATFORM_LIBRARIES})
15
16add_test(NAME tests COMMAND $<TARGET_FILE:tests>)
diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp
new file mode 100644
index 000000000..73978676f
--- /dev/null
+++ b/src/tests/tests.cpp
@@ -0,0 +1,9 @@
1// Copyright 2016 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#define CATCH_CONFIG_MAIN
6#include <catch.hpp>
7
8// Catch provides the main function since we've given it the
9// CATCH_CONFIG_MAIN preprocessor directive.