| 
									
										
										
										
											2012-06-10 04:15:44 +08:00
										 |  |  | # Assemble local libraries
 | 
					
						
							| 
									
										
										
										
											2013-08-19 23:32:21 +08:00
										 |  |  | set (tests_full_libs | 
					
						
							|  |  |  |     ${gtsam-default}
 | 
					
						
							|  |  |  |     CppUnitLite)
 | 
					
						
							| 
									
										
										
										
											2012-02-01 03:59:19 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-02-12 06:38:53 +08:00
										 |  |  | # exclude certain files
 | 
					
						
							|  |  |  | # note the source dir on each 
 | 
					
						
							|  |  |  | set (tests_exclude | 
					
						
							| 
									
										
										
										
											2012-05-22 04:54:40 +08:00
										 |  |  |     #"${CMAKE_CURRENT_SOURCE_DIR}/testOccupancyGrid.cpp"
 | 
					
						
							| 
									
										
										
										
											2012-02-12 06:38:53 +08:00
										 |  |  | )
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-05-21 06:23:04 +08:00
										 |  |  | if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # might not be best test - Richard & Jason & Frank
 | 
					
						
							|  |  |  | 	# clang linker segfaults on large testSerializationSLAM 
 | 
					
						
							|  |  |  | 	list (APPEND tests_exclude "${CMAKE_CURRENT_SOURCE_DIR}/testSerializationSLAM.cpp") 
 | 
					
						
							|  |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:21 +08:00
										 |  |  | # Build tests
 | 
					
						
							| 
									
										
										
										
											2012-02-01 03:59:15 +08:00
										 |  |  | if (GTSAM_BUILD_TESTS)
 | 
					
						
							| 
									
										
										
										
											2012-03-30 02:57:31 +08:00
										 |  |  |     # Subdirectory target for tests
 | 
					
						
							| 
									
										
										
										
											2012-02-01 03:59:15 +08:00
										 |  |  |     add_custom_target(check.tests COMMAND ${CMAKE_CTEST_COMMAND})
 | 
					
						
							| 
									
										
										
										
											2012-03-30 02:57:31 +08:00
										 |  |  |     set(is_test TRUE)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # Build grouped tests
 | 
					
						
							|  |  |  |     gtsam_add_grouped_scripts("tests"               # Use subdirectory as group label
 | 
					
						
							| 
									
										
										
										
											2013-06-21 00:05:20 +08:00
										 |  |  |     "test*.cpp;*.h" check "Test"                      # Standard for all tests
 | 
					
						
							| 
									
										
										
										
											2013-08-19 23:32:21 +08:00
										 |  |  |     "${tests_full_libs}" "${tests_full_libs}" "${tests_exclude}"  # Pass in linking and exclusion lists
 | 
					
						
							| 
									
										
										
										
											2012-03-30 02:57:31 +08:00
										 |  |  |     ${is_test})                                         # Set all as tests
 | 
					
						
							| 
									
										
										
										
											2012-02-01 03:59:15 +08:00
										 |  |  | endif (GTSAM_BUILD_TESTS)
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:21 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Build timing scripts
 | 
					
						
							| 
									
										
										
										
											2012-02-01 03:59:15 +08:00
										 |  |  | if (GTSAM_BUILD_TIMING)
 | 
					
						
							| 
									
										
										
										
											2012-03-30 02:57:31 +08:00
										 |  |  |     # Subdirectory target for timing - does not actually execute the scripts
 | 
					
						
							| 
									
										
										
										
											2012-02-01 03:59:15 +08:00
										 |  |  |     add_custom_target(timing.tests)
 | 
					
						
							| 
									
										
										
										
											2012-03-30 02:57:31 +08:00
										 |  |  |     set(is_test FALSE)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # Build grouped benchmarks
 | 
					
						
							|  |  |  |     gtsam_add_grouped_scripts("tests"               # Use subdirectory as group label
 | 
					
						
							|  |  |  |     "time*.cpp" timing "Timing Benchmark"         # Standard for all timing scripts
 | 
					
						
							| 
									
										
										
										
											2013-08-19 23:32:21 +08:00
										 |  |  |     "${tests_full_libs}" "${tests_full_libs}" "${tests_exclude}"   # Pass in linking and exclusion lists
 | 
					
						
							| 
									
										
										
										
											2012-04-24 22:01:42 +08:00
										 |  |  |     ${is_test})
 | 
					
						
							| 
									
										
										
										
											2012-02-01 03:59:15 +08:00
										 |  |  | endif (GTSAM_BUILD_TIMING)
 | 
					
						
							| 
									
										
										
										
											2013-06-21 00:05:21 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | if(MSVC)
 | 
					
						
							|  |  |  | 	set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/testSerializationSLAM.cpp" | 
					
						
							|  |  |  | 		APPEND PROPERTY COMPILE_FLAGS "/bigobj")
 | 
					
						
							|  |  |  | endif()
 |