build: set MIN_LOG_LEVEL correctly (#7419)

closes #7283
regression by 42d892913d

- Don't need to explicitly put "-O2 -g" in RelWithDebInfo; CMake does
  that already. That was left-over from 42d892913d which removed the
  "Dev" custom build-type, but repurposed the logic for RelWithDebInfo.

- `if(DEFINED MIN_LOG_LEVEL)` doesn't work.
- `if(${MIN_LOG_LEVEL} MATCHES "^$")` doesn't work if -DMIN_LOG_LEVEL is
  omitted.
- `if(MIN_LOG_LEVEL)` also isn't what we want: it would be true if
  MIN_LOG_LEVEL=0.
This commit is contained in:
Justin M. Keyes
2017-10-21 02:30:21 +02:00
committed by GitHub
parent 6338199b76
commit 37420ef942
2 changed files with 12 additions and 14 deletions

View File

@@ -164,7 +164,7 @@ if(NOT MSVC)
endif()
endif()
if(DEFINED MIN_LOG_LEVEL)
if(NOT "${MIN_LOG_LEVEL}" MATCHES "^$")
add_definitions(-DMIN_LOG_LEVEL=${MIN_LOG_LEVEL})
endif()