From: bruneton Date: Tue, 17 Sep 2013 12:25:42 +0000 (+0000) Subject: CMake: added advanced options SALOME_BUILD_FOR_GCOV to add flags: X-Git-Tag: begin_agr_portmanager_branch_131004~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2a6697be2d287c6d1941c1b9abc6393a92b5e979;p=modules%2Fkernel.git CMake: added advanced options SALOME_BUILD_FOR_GCOV to add flags: -fprofile-arcs -ftest-coverage to compiler flags. --- diff --git a/salome_adm/cmake_files/SalomeSetupPlatform.cmake b/salome_adm/cmake_files/SalomeSetupPlatform.cmake index 317be31c5..57b5f2fd4 100644 --- a/salome_adm/cmake_files/SalomeSetupPlatform.cmake +++ b/salome_adm/cmake_files/SalomeSetupPlatform.cmake @@ -116,3 +116,13 @@ IF(APPLE) SET(CMAKE_CXX_COMPILER g++) # because default is clang(llvm) with mountain lion at least ENDIF() + +# Compiler flags for coverage testing +IF(NOT WIN32) + OPTION(SALOME_BUILD_FOR_GCOV "Add the compilation flags for GCov/LCov" OFF) + MARK_AS_ADVANCED(SALOME_BUILD_FOR_GCOV) + IF(SALOME_BUILD_FOR_GCOV) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage") + ENDIF() +ENDIF()