aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 0000000..a0e7e89
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,22 @@
+if(CMAKE_HOST_WIN32)
+ set(libname "libconfig")
+else()
+ set(libname "config")
+endif()
+
+include_directories(${CMAKE_SOURCE_DIR}/lib)
+
+add_executable(libconfig_tests
+ tests.c
+)
+
+target_link_libraries(libconfig_tests
+ ${libname}
+ libtinytest
+)
+
+add_test(
+ NAME libconfig_tests
+ COMMAND libconfig_tests
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests
+)