diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-30 19:06:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 19:06:32 +0100 |
commit | 27b81af19c498892f4b0444ad29b7be842f8e7b8 (patch) | |
tree | c17adda91d2b3896c0946c6f9ca7546dece5ab4a | |
parent | 979b7b0c4950b19cf180758d98fec170834eeb66 (diff) | |
download | rneovim-27b81af19c498892f4b0444ad29b7be842f8e7b8.tar.gz rneovim-27b81af19c498892f4b0444ad29b7be842f8e7b8.tar.bz2 rneovim-27b81af19c498892f4b0444ad29b7be842f8e7b8.zip |
refactor!: remove has("debug") (#22060)
This value can not be relied on as it doesn't work for
multi-configuration generators. I don't think this undocumented option
is used much, if at all, so I think we should remove it.
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | cmake.config/config.h.in | 2 | ||||
-rw-r--r-- | runtime/lua/nvim/health.lua | 11 | ||||
-rw-r--r-- | src/nvim/eval/funcs.c | 3 |
4 files changed, 4 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 34a78dc9b2..095750328a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,11 +117,6 @@ endif() message(STATUS "CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}") set_default_buildtype() -if(CMAKE_BUILD_TYPE MATCHES Debug) - set(DEBUG 1) -else() - set(DEBUG 0) -endif() # If not in a git repo (e.g., a tarball) these tokens define the complete # version string, else they are combined with the result of `git describe`. diff --git a/cmake.config/config.h.in b/cmake.config/config.h.in index c8377bf45c..4669e42c0f 100644 --- a/cmake.config/config.h.in +++ b/cmake.config/config.h.in @@ -1,8 +1,6 @@ #ifndef AUTO_CONFIG_H #define AUTO_CONFIG_H -#cmakedefine DEBUG - #cmakedefine SIZEOF_INT @SIZEOF_INT@ #cmakedefine SIZEOF_INTMAX_T @SIZEOF_INTMAX_T@ #cmakedefine SIZEOF_INT32_T @SIZEOF_INT32_T@ diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua index b76106f241..f11899434e 100644 --- a/runtime/lua/nvim/health.lua +++ b/runtime/lua/nvim/health.lua @@ -156,13 +156,10 @@ local function check_performance() health.report_ok(buildtype) else health.report_info(buildtype) - health.report_warn( - 'Non-optimized ' .. (has('debug') and '(DEBUG) ' or '') .. 'build. Nvim will be slower.', - { - 'Install a different Nvim package, or rebuild with `CMAKE_BUILD_TYPE=RelWithDebInfo`.', - suggest_faq, - } - ) + health.report_warn('Non-optimized debug build. Nvim will be slower.', { + 'Install a different Nvim package, or rebuild with `CMAKE_BUILD_TYPE=RelWithDebInfo`.', + suggest_faq, + }) end -- check for slow shell invocation diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 938fef9a52..48f3cd4293 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -3064,9 +3064,6 @@ static void f_has(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) "conceal", "cursorbind", "cursorshape", -#ifdef DEBUG - "debug", -#endif "dialog_con", "diff", "digraphs", |