Added compile option to build gcov data

This commit is contained in:
Joseph Lenox 2018-07-31 19:21:20 -05:00
parent d3c18cd1b5
commit 07b982dd60

View File

@ -7,6 +7,7 @@ option(SLIC3R_BUILD_TESTS "Build tests for libslic3r." ON)
option(SLIC3R_STATIC "Build and link Slic3r statically." ON)
option(BUILD_EXTRUDE_TIN "Build and link the extrude-tin application." OFF)
option(PROFILE "Build with gprof profiling output." OFF)
option(COVERAGE "Build with gcov code coverage profiling." OFF)
# only on newer GCCs: -ftemplate-backtrace-limit=0
add_compile_options(-DNO_PERL -Wall -DM_PI=3.14159265358979323846 -D_GLIBCXX_USE_C99 -DHAS_BOOL -DNOGDI -DBOOST_ASIO_DISABLE_KQUEUE)
@ -49,10 +50,13 @@ elseif (CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
add_compile_options(-g -O3)
endif()
IF(PROFILE)
if(PROFILE)
add_compile_options(-g -pg -DBUILD_PROFILE)
endif(PROFILE)
if(COVERAGE)
add_compile_options(-g -ftest-coverage)
endif(COVERAGE)
set(CMAKE_INCLUDE_CURRENT_DIR ON)