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.
This commit is contained in:
dundargoc
2023-02-07 14:43:45 +01:00
committed by GitHub
parent 8fbe75b3dd
commit c1d76363ac
7 changed files with 58 additions and 50 deletions

View File

@@ -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 <msgpack.h>