Skip to content

Commit

Permalink
Split each build configuration into a separate CI job. (KhronosGroup#546
Browse files Browse the repository at this point in the history
)

Expose the main CMake config knobs as environment variables to tailor build configurations & jobs.

Replace macOS Universal Binary builds with Apple Silicon builds while retaining x86_64 builds.

Add new configs/jobs for testing OpenCL and SSE combos.

Cleanup CI files.
  • Loading branch information
MarkCallow authored Mar 8, 2022
1 parent 785fd31 commit 49bf682
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -505,11 +505,15 @@ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
elseif(EMSCRIPTEN)
set_source_files_properties(
${BASISU_ENCODER_CXX_SRC}
PROPERTIES COMPILE_OPTIONS "-Wno-sign-compare;-Wno-unused-variable;-Wno-unused-parameter"
PROPERTIES COMPILE_OPTIONS "-Wno-sign-compare;-Wno-unused-variable;-Wno-unused-parameter;-Wno-unused-but-set-variable"
)
set_source_files_properties(
lib/basisu/transcoder/basisu_transcoder.cpp
PROPERTIES COMPILE_OPTIONS "-Wno-sign-compare;-Wno-unused-function;-Wno-unused-variable;"
PROPERTIES COMPILE_OPTIONS "-Wno-sign-compare;-Wno-unused-function;-Wno-unused-variable"
)
set_source_files_properties(
lib/basisu/zstd/zstd.c
PROPERTIES COMPILE_OPTIONS "-Wno-unused-but-set-variable;-Wno-bitwise-instead-of-logical"
)
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
#message(STATUS "CMAKE_CXX_COMPILER_VERSION = ${CMAKE_CXX_COMPILER_VERSION}")
Expand Down
29 changes: 15 additions & 14 deletions lib/etcdec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,16 @@ submitted to the exclusive jurisdiction of the Swedish Courts.
// code to suppress them. Yes it is a mod but it doesn't change
// the source of the functions or the compiled binary code.
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4100 4244 )
#pragma warning(push)
#pragma warning(disable: 4100 4244 )
#elif __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#if defined(EMSCRIPTEN)
// Emscripten 3.1.6 lang warns this but not clang 13 in Xcode and Xcode
// warns no such warning group if this is set, hence the extra ifdef.
#pragma clang diagnostic ignored "-Wunused-but-set-variable"
#endif
#elif __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
Expand Down Expand Up @@ -303,11 +308,9 @@ void read_big_endian_2byte_word(unsigned short *blockadr, FILE *f)
{
uint8 bytes[2];
unsigned short block;
// This is to silence -Wunused-result from GCC 4.8+.
size_t numitems;

numitems = fread(&bytes[0], 1, 1, f);
numitems = fread(&bytes[1], 1, 1, f);
(void)fread(&bytes[0], 1, 1, f);
(void)fread(&bytes[1], 1, 1, f);

block = 0;
block |= bytes[0];
Expand All @@ -323,13 +326,11 @@ void read_big_endian_4byte_word(unsigned int *blockadr, FILE *f)
{
uint8 bytes[4];
unsigned int block;
// This is to silence -Wunused-result from GCC 4.8+.
size_t numitems;

numitems = fread(&bytes[0], 1, 1, f);
numitems = fread(&bytes[1], 1, 1, f);
numitems = fread(&bytes[2], 1, 1, f);
numitems = fread(&bytes[3], 1, 1, f);
(void)fread(&bytes[0], 1, 1, f);
(void)fread(&bytes[1], 1, 1, f);
(void)fread(&bytes[2], 1, 1, f);
(void)fread(&bytes[3], 1, 1, f);

block = 0;
block |= bytes[0];
Expand Down

0 comments on commit 49bf682

Please sign in to comment.