cmake: Pass -DMIN_LOG_LEVEL as compiler definition

- Check if MIN_LOG_LEVEL value is a number 0-3, default to
  INFO (1) or ignore it in Release mode
- When TRAVIS_CI_BUILD is ON the default is DEBUG (0)
- Add local.mk.example
This commit is contained in:
Rui Abreu Ferreira
2014-12-08 20:00:54 +00:00
parent 50db0312f9
commit 72d03cc961
4 changed files with 21 additions and 3 deletions

View File

@@ -108,6 +108,10 @@ if(NOT MSVC)
${CONV_SOURCES} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-conversion")
endif()
if(DEFINED MIN_LOG_LEVEL)
add_definitions(-DMIN_LOG_LEVEL=${MIN_LOG_LEVEL})
endif()
get_directory_property(gen_cdefs COMPILE_DEFINITIONS)
foreach(gen_cdef ${gen_cdefs} DO_NOT_DEFINE_EMPTY_ATTRIBUTES)
if(NOT "${gen_cdef}" MATCHES "INCLUDE_GENERATED_DECLARATIONS")