Couple of small optimisation

Add option to build for gprof
Do not build by default with the renderstat (they have a reasonable impact on performances)
Separated created ray and castedray in the stats
Trying to force some simple function to be inlined
This commit is contained in:
Godzil
2020-03-13 18:22:35 +00:00
parent aacd4f6c9e
commit 9849c16f66
8 changed files with 32 additions and 20 deletions

View File

@@ -12,11 +12,17 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/external/covera
option(PACKAGE_TESTS "Build the tests" ON)
option(ENABLE_COVERAGE "Build for code coverage" OFF)
option(SHOW_STATS "Show rendering stat" ON)
option(SHOW_STATS "Show rendering stat" OFF)
if (SHOW_STATS)
add_compile_options(-DRENDER_STATS)
endif()
option(USE_GPROF "Enable profiling" OFF)
if (USE_GPROF)
add_compile_options(-pg)
add_link_options(-pg)
endif()
option(USE_LUA "Enable the use of Lua" ON)
if (USE_LUA)
add_compile_options(-DENABLE_LUA_SUPPORT)