| 
									
										
										
										
											2011-12-14 10:24:21 +08:00
										 |  |  | include_directories( | 
					
						
							|  |  |  |   3rdparty/UFconfig 
 | 
					
						
							|  |  |  |   3rdparty/CCOLAMD/Include
 | 
					
						
							|  |  |  |   ${CMAKE_SOURCE_DIR})
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | find_package(Boost COMPONENTS serialization REQUIRED)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Build tests
 | 
					
						
							|  |  |  | file(GLOB tests_srcs "test*.cpp")
 | 
					
						
							|  |  |  | foreach(test_src ${tests_srcs})
 | 
					
						
							|  |  |  |     get_filename_component(test_base ${test_src} NAME_WE)
 | 
					
						
							|  |  |  |     set( test_bin ${test_base} )
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:23 +08:00
										 |  |  |     add_executable(${test_bin} EXCLUDE_FROM_ALL ${test_src})
 | 
					
						
							|  |  |  |     add_dependencies(check ${test_bin})
 | 
					
						
							| 
									
										
										
										
											2011-12-16 00:17:58 +08:00
										 |  |  |     add_dependencies(${test_bin} ${PROJECT_NAME}-static)
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:21 +08:00
										 |  |  |     add_test(${test_bin} ${EXECUTABLE_OUTPUT_PATH}${test_bin})
 | 
					
						
							| 
									
										
										
										
											2011-12-16 00:17:58 +08:00
										 |  |  |     target_link_libraries(${test_bin} CppUnitLite gtsam-static ${Boost_SERIALIZATION_LIBRARY})
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:21 +08:00
										 |  |  |     add_custom_target(${test_base}.run ${EXECUTABLE_OUTPUT_PATH}${test_bin} ${ARGN})
 | 
					
						
							|  |  |  | endforeach(test_src)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Build timing scripts
 | 
					
						
							|  |  |  | file(GLOB time_srcs "time*.cpp") 
 | 
					
						
							|  |  |  | foreach(time_src ${time_srcs})
 | 
					
						
							|  |  |  |     get_filename_component(time_base ${time_src} NAME_WE)
 | 
					
						
							|  |  |  |     set( time_bin ${time_base} )
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:23 +08:00
										 |  |  |     add_executable(${time_bin} EXCLUDE_FROM_ALL ${time_src})
 | 
					
						
							| 
									
										
										
										
											2011-12-16 00:17:58 +08:00
										 |  |  |     add_dependencies(timing ${time_bin})
 | 
					
						
							|  |  |  |     add_dependencies(${test_bin} ${PROJECT_NAME}-static)
 | 
					
						
							|  |  |  |     target_link_libraries(${time_bin} CppUnitLite gtsam-static)
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:21 +08:00
										 |  |  |     add_custom_target(${time_base}.run ${EXECUTABLE_OUTPUT_PATH}${time_bin} ${ARGN})
 | 
					
						
							|  |  |  | endforeach(time_src)
 |