From bb9c673d2cf022e75d1d34d2b2dd12a1e41dc6ac Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Mon, 13 Feb 2023 20:04:54 +0100 Subject: ci: automatically maximize MIN_LOG_LEVEL if CI detected (#22248) Detect if on CI by checking that the CI environment variable is set to "true". This is a common pattern among CI providers, including github actions and cirrus. --- src/nvim/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 7409a5e5c5..a193af6d51 100755 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -412,6 +412,9 @@ else() endif() # Log level (MIN_LOG_LEVEL in log.h) +if($ENV{CI} MATCHES "true") + set(MIN_LOG_LEVEL 3) +endif() if("${MIN_LOG_LEVEL}" MATCHES "^$") # Minimize logging for release-type builds. target_compile_definitions(main_lib INTERFACE MIN_LOG_LEVEL=$,1,3>) -- cgit