diff CMakeLists.txt @ 47:7447b2d42ad7

cmake: move all the test related macros into a separate file Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Wed, 30 Mar 2016 16:51:26 -0400
parents 905e9ad459a0
children 7c8b420182c0
line wrap: on
line diff
--- a/CMakeLists.txt	Tue Mar 29 19:30:18 2016 -0400
+++ b/CMakeLists.txt	Wed Mar 30 16:51:26 2016 -0400
@@ -44,6 +44,7 @@
 
 include(cmake/config.cmake)
 include(cmake/mapfile.cmake)
+include(cmake/test.cmake)
 
 # handle missing libumem
 if(NOT UMEM_FOUND)
@@ -107,23 +108,10 @@
 	DESTINATION include/jeffpc
 	PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
 
-function(simple_c_test type section bin data)
-	add_test(NAME "${type}:${section}:${data}"
-		 COMMAND "${CMAKE_BINARY_DIR}/test_${bin}"
-			 "${CMAKE_CURRENT_SOURCE_DIR}/${data}"
-	)
-endfunction()
-
 #
 # Test related executables
 #
 
-add_executable(test_sexpr_parser
-	test_sexpr_parser.c
-)
-
-target_link_libraries(test_sexpr_parser
-	jeffpc
-)
+build_test_bin(sexpr_parser)
 
 add_subdirectory(tests)