Skip to content

Commit

Permalink
Fix test build
Browse files Browse the repository at this point in the history
  • Loading branch information
solidpixel committed Jan 16, 2025
1 parent 421dac4 commit 8d4f001
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
13 changes: 10 additions & 3 deletions Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,17 @@ if(${ASTCENC_UNITTEST})
set(CMAKE_OSX_ARCHITECTURES x86_64;arm64)
add_subdirectory(GoogleTest)

# Workaround Google Test issue
# Workaround GoogleTest CRT selection issue issue
# See https://github.com/google/googletest/issues/4067
set_property(TARGET gtest PROPERTY MSVC_RUNTIME_LIBRARY "-MT")
set_property(TARGET gtest_main PROPERTY MSVC_RUNTIME_LIBRARY "-MT")
set_property(
TARGET gtest
PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

set_property(
TARGET gtest_main
PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

enable_testing()
add_subdirectory(UnitTest)
Expand Down
3 changes: 2 additions & 1 deletion Source/astcenc_internal.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// ----------------------------------------------------------------------------
// Copyright 2011-2024 Arm Limited
// Copyright 2011-2025 Arm Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
Expand Down Expand Up @@ -257,6 +257,7 @@ static inline unsigned int get_quant_level(quant_method method)
case QUANT_160: return 160;
case QUANT_192: return 192;
case QUANT_256: return 256;
default: break;
}

// Unreachable - the enum is fully described
Expand Down

0 comments on commit 8d4f001

Please sign in to comment.