# ---[ Unit tests
rosbuild_add_gtest (test_kdtree test_kdtree.cpp)
rosbuild_add_gtest (test_common test_common.cpp)

rosbuild_add_gtest (test_io test_io.cpp)
target_link_libraries (test_io pcl_io)

rosbuild_add_gtest (test_feature test_feature.cpp)
rosbuild_add_openmp_flags (test_feature)
target_link_libraries (test_feature pcl_io tbb)

rosbuild_add_gtest (test_sample_consensus test_sample_consensus.cpp)
target_link_libraries (test_sample_consensus pcl_io)

rosbuild_add_gtest (test_filters test_filters.cpp)
target_link_libraries (test_filters pcl_filters pcl_io)

rosbuild_add_gtest (test_transforms test_transforms.cpp)
target_link_libraries (test_transforms pcl_io)

rosbuild_add_gtest (test_segmentation test_segmentation.cpp)
target_link_libraries (test_segmentation pcl_io)

rosbuild_add_gtest (test_iterators test_iterators.cpp)
target_link_libraries (test_iterators pcl_io)

rosbuild_add_gtest (test_registration test_registration.cpp)
target_link_libraries (test_registration pcl_io pcl_registration)
rosbuild_link_boost (test_registration system filesystem)

#rosbuild_add_gtest (test_mls test_mls.cpp)
rosbuild_add_executable (test_mls test_mls.cpp)
target_link_libraries (test_mls pcl_io)

# -[ Precompiled headers
#if (PCHSupport_FOUND)
#  set (pch_header ${CMAKE_CURRENT_SOURCE_DIR}/../include/pcl/pcl_nodelet.h)
#  if (CMAKE_COMPILER_IS_GNUCXX AND ${CMAKE_GENERATOR} MATCHES ".*Makefiles")
#    add_precompiled_header (bla ${pch_header})
#  endif()
#endif()
