mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-02-08 10:46:59 +08:00
Add config option for compiling with gprof output
This commit is contained in:
parent
985b62705f
commit
3a675bf379
@ -68,6 +68,13 @@ if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|||||||
set(LINKER_FLAGS "${LINKER_FLAGS} -flto")
|
set(LINKER_FLAGS "${LINKER_FLAGS} -flto")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option(GPROF_OUTPUT "Generate profile data" FALSE)
|
||||||
|
if (GPROF_OUTPUT)
|
||||||
|
add_definitions(-pg)
|
||||||
|
set(LINKER_FLAGS "${LINKER_FLAGS} -pg")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
option(PROFILE_GENERATE "Generate profile data" FALSE)
|
option(PROFILE_GENERATE "Generate profile data" FALSE)
|
||||||
if (PROFILE_GENERATE)
|
if (PROFILE_GENERATE)
|
||||||
add_definitions(-fprofile-generate)
|
add_definitions(-fprofile-generate)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user