I already tried a lot of solutions that i founded but none of then work. I'm working on a new code for a project, but this code was touched by a lot of master and doctor degrees that do not care on make it readeable. So there is really bunch of things that is not useful or even used.
Then i head about gcov and lcov, but after i generate .info file and load into lcov html, besides of all my files it just track the main file! Even knowing a lot of other functions and files were used!
(Really sorry for my bad english, im from Manaus, Amazonas - Brazil and not a good english speaker! But ive looked for this answer for like a month trying alot of things but got no luck at all)
My files look like:
-src/
-core/
-Index.cpp/h
-PostingList.cpp/h
-PreProcessor.cpp/h
-methods/
...
-parser/
...
-run/
...
-structures/
...
-utils/
...
I got a CMakeFile.txt in project source directory that look like this:
cmake_minimum_required (VERSION 2.4)
project (queryProcessor)
include("${${PROJECT_NAME}_SOURCE_DIR}/globalVariables.cmake")
include_directories(${INCLUDES})
link_directories(${LIBS})
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
add_subdirectory(src)
add_executable(QueryProcessor src/run/queryProcessor.cpp)
target_link_libraries (QueryProcessor libQueryProcessor rt -fprofile-arcs)
add_definitions(-O2 )
and another on src directory that looks like this:
aux_source_directory( utils UTILS )
aux_source_directory( parser PARSER )
aux_source_directory( methods METHODS )
aux_source_directory( structures STRUCTURES )
aux_source_directory( core CORE )
aux_source_directory( . SRC )
aux_source_directory( ../../libs-iw/indexer/include UTILS2 )
add_library( libQueryProcessor ${UTILS} ${UTILS2} ${SRC} ${PARSER} ${METHODS} ${STRUCTURES} ${CORE})
set(CMAKE_CXX_FLAGS "--coverage")
include ( ${${PROJECT_NAME}_SOURCE_DIR}/install.cmake )
Any help will be appreciated including suggestions for better CMakeFiles, thanks in advance