Skip to content

Commit a6e1e76

Browse files
committed
Fix test build
1 parent 421dac4 commit a6e1e76

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

Source/CMakeLists.txt

+10-3
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,17 @@ if(${ASTCENC_UNITTEST})
105105
set(CMAKE_OSX_ARCHITECTURES x86_64;arm64)
106106
add_subdirectory(GoogleTest)
107107

108-
# Workaround Google Test issue
108+
# Workaround GoogleTest CRT selection issue issue
109109
# See https://github.com/google/googletest/issues/4067
110-
set_property(TARGET gtest PROPERTY MSVC_RUNTIME_LIBRARY "-MT")
111-
set_property(TARGET gtest_main PROPERTY MSVC_RUNTIME_LIBRARY "-MT")
110+
set_property(
111+
TARGET gtest
112+
PROPERTY
113+
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
114+
115+
set_property(
116+
TARGET gtest_main
117+
PROPERTY
118+
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
112119

113120
enable_testing()
114121
add_subdirectory(UnitTest)

Source/UnitTest/cmake_core.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ target_compile_options(${ASTCENC_TEST}
6565
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-c++98-c++11-compat-pedantic>
6666
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-float-equal>
6767
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-overriding-option>
68+
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-unsafe-buffer-usage>
6869

6970
# Ignore things that the googletest build triggers
7071
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-unknown-warning-option>

Source/astcenc_internal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// ----------------------------------------------------------------------------
3-
// Copyright 2011-2024 Arm Limited
3+
// Copyright 2011-2025 Arm Limited
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
66
// use this file except in compliance with the License. You may obtain a copy

0 commit comments

Comments
 (0)