feat: optimize out in Release builds

- fix: fastest scope matching,
- feat: try to allow the compiler to optimize out as many conditional statements as possible,
        which allow to use clutchlog for progress-only messages in Release mode.
- feat: build_all.sh test script,
- fix: typo in macro declarations in builds without clutchlog,
- update the README accordingly.
This commit is contained in:
Johann Dreo 2020-09-15 23:07:42 +02:00
commit 243b22e4c1
6 changed files with 239 additions and 29 deletions

View file

@ -16,9 +16,6 @@ set(VERSION_MINOR 1 CACHE STRING "Minor version number" )
set(VERSION_PATCH 0 CACHE STRING "Patch version number" )
mark_as_advanced(VERSION_MAJOR VERSION_MINOR VERSION_PATCH)
# There's no point building clutchlog tests in Release
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_STANDARD_LIBRARIES -lstdc++fs)
######################################################################################
@ -33,6 +30,10 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# Dump used compiler flags.
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(WITH_CLUTCHLOG "Define WITH_CLUTCHLOG, whatever the build type." OFF)
if(WITH_CLUTCHLOG)
add_definitions(-DWITH_CLUTCHLOG)
endif()
######################################################################################
# Start building