yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Ellie HermaszewskaPut debug symbols in releases (#5370)44dc5ea20

master
732 B23 linesraw
1# Make sure that shared debug info doesn't intefere with caching
2# See the sccache readme
3if(
4    MSVC
5    AND (NOT DEFINED CMAKE_MSVC_DEBUG_INFORMATION_FORMAT)
6    AND (
7        CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache"
8        OR CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache"
9    )
10)
11    message(
12        NOTICE
13        "Setting embedded debug info for MSVC to work around (s)ccache's inability to cache shared debug info files"
14    )
15    cmake_minimum_required(VERSION 3.25)
16    cmake_policy(GET CMP0141 cmp0141)
17    if(NOT cmp0141 STREQUAL "NEW")
18        message(WARNING "Need CMake policy 0141 enabled")
19    endif()
20    set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
21        "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>"
22    )
23endif()