mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-31 07:22:03 +08:00
Added compile option to build with gprof
This commit is contained in:
parent
1568a11e0c
commit
d3c18cd1b5
@ -6,6 +6,7 @@ option(GUI_BUILD_TESTS "Build tests for Slic3r GUI." ON)
|
|||||||
option(SLIC3R_BUILD_TESTS "Build tests for libslic3r." ON)
|
option(SLIC3R_BUILD_TESTS "Build tests for libslic3r." ON)
|
||||||
option(SLIC3R_STATIC "Build and link Slic3r statically." ON)
|
option(SLIC3R_STATIC "Build and link Slic3r statically." ON)
|
||||||
option(BUILD_EXTRUDE_TIN "Build and link the extrude-tin application." OFF)
|
option(BUILD_EXTRUDE_TIN "Build and link the extrude-tin application." OFF)
|
||||||
|
option(PROFILE "Build with gprof profiling output." OFF)
|
||||||
|
|
||||||
# only on newer GCCs: -ftemplate-backtrace-limit=0
|
# 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)
|
add_compile_options(-DNO_PERL -Wall -DM_PI=3.14159265358979323846 -D_GLIBCXX_USE_C99 -DHAS_BOOL -DNOGDI -DBOOST_ASIO_DISABLE_KQUEUE)
|
||||||
@ -47,9 +48,10 @@ elseif (CMAKE_BUILD_TYPE MATCHES Release)
|
|||||||
elseif (CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
elseif (CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
||||||
add_compile_options(-g -O3)
|
add_compile_options(-g -O3)
|
||||||
endif()
|
endif()
|
||||||
# Flags for debug and release tuning
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 ${CMAKE_CXX_FLAGS}")
|
IF(PROFILE)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 ${CMAKE_CXX_FLAGS}")
|
add_compile_options(-g -pg -DBUILD_PROFILE)
|
||||||
|
endif(PROFILE)
|
||||||
|
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user