-# Google test macro
-macro(ADD_GOOGLE_TESTS executable)
- foreach ( source ${ARGN} )
- file(READ "${source}" contents)
- string(REGEX MATCHALL "TEST_?F?\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
- foreach(hit ${found_tests})
- string(REGEX REPLACE ".*\\(([A-Za-z_0-9]+)[, ]*([A-Za-z_0-9]+)\\).*" "\\1.\\2" test_name ${hit})
- add_test(${test_name} ${executable} --gtest_filter=${test_name})
- endforeach(hit)
- endforeach()
-endmacro()
-#=========================================================
-#=========================================================