Permalink
Browse files

add gcov option to scons to prep for SERVER-1600

  • Loading branch information...
1 parent 6827918 commit c72786cdd14767f8d700fc0994ac3a3627524ef7 @erh erh committed Mar 2, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 SConstruct
View
@@ -197,6 +197,7 @@ add_option( "clang" , "use clang++ rather than g++ (experimental)" , 0 , True )
add_option( "tcmalloc" , "link against tcmalloc" , 0 , False )
add_option( "gdbserver" , "build in gdb server support" , 0 , True )
add_option( "heapcheck", "link to heap-checking malloc-lib and look for memory leaks during tests" , 0 , False )
+add_option( "gcov" , "compile with flags for gcov" , 0 , True )
add_option("smokedbprefix", "prefix to dbpath et al. for smoke tests", 1 , False )
add_option("smokeauth", "run smoke tests with --auth", 0 , False )
@@ -716,6 +717,10 @@ if nix:
if linux and has_option( "sharedclient" ):
env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )
+ if linux and has_option( "gcov" ):
+ env.Append( CXXFLAGS=" -fprofile-arcs -ftest-coverage " )
+ env.Append( LINKFLAGS=" -fprofile-arcs -ftest-coverage " )
+
if debugBuild:
env.Append( CPPFLAGS=" -O0 -fstack-protector " );
env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind

0 comments on commit c72786c

Please sign in to comment.