Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Enable code coverage by option.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Mar 2010 15:05:06 +0000 (15:05 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Mar 2010 15:05:06 +0000 (15:05 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7382 48e7efb5-ca39-0410-a469-dd3cf9ba447f

CMakeLists.txt
buildtools/Cmake/src/CMakeOption.txt

index 4e7a657..6492dda 100644 (file)
@@ -27,6 +27,9 @@ set(INCLUDES "-I${PROJECT_DIRECTORY}/include -I${PROJECT_DIRECTORY}/src/include
 set(CMAKE_SOURCE_DIR ${PROJECT_SOURCE_DIRECTORY})
 
 add_definitions (${INCLUDES})
+if(enable_coverage)
+add_definitions (-fprofile-arcs -ftest-coverage)
+endif(enable_coverage)
 
 ### Setup Options
 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeOption.txt)
index 067f1bb..3d4db3c 100644 (file)
@@ -15,6 +15,7 @@ option(disable_ruby "This variable set ruby use." off)
 option(enable_compile_warnings "" off)
 option(enable_compile_optimizations "" off)
 option(enable_maintainer_mode "Permit to make flex and flexml files." off)
+option(enable_coverage "Enable coverage." off)
 option(supernovae "Supernovae mode." off)
 
 mark_as_advanced(LUA_LIB_PATH_1)