Skip to content

Instantly share code, notes, and snippets.

@aiwhj
Last active July 3, 2019 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aiwhj/f5573b8fd8437eadfe99c8e331341791 to your computer and use it in GitHub Desktop.
Save aiwhj/f5573b8fd8437eadfe99c8e331341791 to your computer and use it in GitHub Desktop.
mac 下 C++ 开启 coverage,做覆盖度测试

CPPFLAGS="$CPPFLAGS -coverage -Wall -fprofile-arcs"

In a vanilla gnu make, there's no such thing as CCFLAGS. There are CFLAGS, CPPFLAGS, and CXXFLAGS. CFLAGS for the C compiler, CXXFLAGS for C++, and CPPFLAGS for both.

php-ext coverage .m4

  CPPFLAGS="$CPPFLAGS -coverage -Wall -fprofile-arcs"
  EXTRA_LDFLAGS="$EXTRA_LDFLAGS -precious-files-regex '.*(gcda|gcno)'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment