From: Augustin Degomme Date: Sun, 29 Mar 2020 11:37:40 +0000 (+0200) Subject: gcov might not be the name of the executable, respect GCOV environment variable in... X-Git-Tag: v3.26~685 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3ba114fcb8d167616ca8ddf5b74bdfd6f4681982 gcov might not be the name of the executable, respect GCOV environment variable in this case --- diff --git a/tools/cmake/Flags.cmake b/tools/cmake/Flags.cmake index 9d6654bfd1..a0d31b2c71 100644 --- a/tools/cmake/Flags.cmake +++ b/tools/cmake/Flags.cmake @@ -210,7 +210,11 @@ endif() set(TESH_OPTION "") if(enable_coverage) - find_program(GCOV_PATH gcov) + if(DEFINED ENV{GCOV}) + find_program(GCOV_PATH ENV{GCOV}) + else() + find_program(GCOV_PATH gcov) + endif() if(GCOV_PATH) set(COVERAGE_COMMAND "${GCOV_PATH}" CACHE TYPE FILEPATH FORCE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCOVERAGE")