Avoid warning when using buildcache on Windows

This commit is contained in:
Magne Sjaastad
2025-02-11 07:40:27 +01:00
committed by GitHub
parent d76f67f3fb
commit e73cd624d1

View File

@@ -124,6 +124,11 @@ if(buildcache_program)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Z7")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Z7")
# Add this to avoid the warning: overriding '/Zi' with '/Z7'
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
"$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>"
)
endif()
else()
message(STATUS "No buildcache found")