From 2395b804ff0dd047b0bdba450da6219d33551e05 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Mon, 12 Jun 2023 14:32:36 -0700 Subject: [PATCH] Fix CMake problem with /Zc:templateScope on older Windows SDKs (#363) --- CMakeLists.txt | 2 +- DirectXTex/d3dx12.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fecc43..038b72c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -472,7 +472,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.35) foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME}) - target_compile_options(${t} PRIVATE /Zc:templateScope /Zc:checkGwOdr) + target_compile_options(${t} PRIVATE /Zc:checkGwOdr $<$:/Zc:templateScope>) endforeach() endif() diff --git a/DirectXTex/d3dx12.h b/DirectXTex/d3dx12.h index db0ad44..a742d8f 100644 --- a/DirectXTex/d3dx12.h +++ b/DirectXTex/d3dx12.h @@ -761,7 +761,7 @@ struct CD3DX12_HEAP_PROPERTIES : public D3D12_HEAP_PROPERTIES bool IsCPUAccessible() const noexcept { return Type == D3D12_HEAP_TYPE_UPLOAD || Type == D3D12_HEAP_TYPE_READBACK -#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609) +#if 0 || Type == D3D12_HEAP_TYPE_GPU_UPLOAD #endif || (Type == D3D12_HEAP_TYPE_CUSTOM &&