From 37420ef942085bf5e9344842a57c796b4d4c9684 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 21 Oct 2017 02:30:21 +0200 Subject: build: set MIN_LOG_LEVEL correctly (#7419) closes #7283 regression by 42d892913daa215c27e41b2255e96c1ce09ea56c - Don't need to explicitly put "-O2 -g" in RelWithDebInfo; CMake does that already. That was left-over from 42d892913daa2 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. --- src/nvim/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index e2f1f16635..bcbbc76cbc 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -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() -- cgit