From c1d76363ac72a7a17b657eaa99df4533d169a40b Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 7 Feb 2023 14:43:45 +0100 Subject: ci: simplify how environment variables are used (#22067) Having a clear separation between when we manipulate variables and when we export them to GITHUB_ENV makes it less error-prone. --- src/nvim/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index fd34a30619..e4bbdda0c3 100755 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -166,13 +166,14 @@ if(CI_BUILD) target_compile_options(main_lib INTERFACE -WX) else() target_compile_options(main_lib INTERFACE -Werror) - if(DEFINED ENV{BUILD_UCHAR}) - # Get some test coverage for unsigned char - target_compile_options(main_lib INTERFACE -funsigned-char) - endif() endif() endif() +option(UNSIGNED_CHAR "Set char to be unsigned" OFF) +if(UNSIGNED_CHAR) + target_compile_options(main_lib INTERFACE -funsigned-char) +endif() + list(APPEND CMAKE_REQUIRED_INCLUDES "${MSGPACK_INCLUDE_DIRS}") check_c_source_compiles(" #include -- cgit