Skip to content

Commit 421dac4

Browse files
committed
Workaroung GTest issue
1 parent e1481b5 commit 421dac4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Source/CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: Apache-2.0
22
# ----------------------------------------------------------------------------
3-
# Copyright 2020-2024 Arm Limited
3+
# Copyright 2020-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
@@ -104,6 +104,12 @@ if(${ASTCENC_UNITTEST})
104104
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
105105
set(CMAKE_OSX_ARCHITECTURES x86_64;arm64)
106106
add_subdirectory(GoogleTest)
107+
108+
# Workaround Google Test issue
109+
# 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")
112+
107113
enable_testing()
108114
add_subdirectory(UnitTest)
109115
endif()

0 commit comments

Comments
 (0)