Fix build break for Debug on WSL (#93)

This commit is contained in:
Chuck Walbourn 2023-01-02 11:26:58 -08:00 committed by GitHub
parent 6b75524236
commit 1968e51fa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 8 deletions

View File

@ -32,6 +32,8 @@ option(ENABLE_USE_EIGEN "Use the Eigen & BLAS libraries" OFF)
# https://devblogs.microsoft.com/cppblog/spectre-mitigations-in-msvc/
option(ENABLE_SPECTRE_MITIGATION "Build using /Qspectre for MSVC" OFF)
option(DISABLE_MSVC_ITERATOR_DEBUGGING "Disable iterator debugging in Debug configurations with the MSVC CRT" OFF)
option(ENABLE_CODE_ANALYSIS "Use Static Code Analysis on build" OFF)
set(CMAKE_CXX_STANDARD 17)
@ -335,6 +337,12 @@ if(WIN32)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_definitions(${t} PRIVATE _UNICODE UNICODE _WIN32_WINNT=${WINVER})
endforeach()
if(DISABLE_MSVC_ITERATOR_DEBUGGING)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_definitions(${t} PRIVATE _ITERATOR_DEBUG_LEVEL=0)
endforeach()
endif()
endif()
if(BUILD_TOOLS AND WIN32 AND (NOT WINDOWS_STORE))

View File

@ -1831,7 +1831,7 @@ HRESULT __cdecl DirectX::UVAtlasApplyRemap(
//-------------------------------------------------------------------------------------
#ifdef _DEBUG
#if defined(_WIN32) && defined(_DEBUG)
_Use_decl_annotations_
void __cdecl UVAtlasDebugPrintf(unsigned int lvl, const char* szFormat, ...)
{
@ -1856,4 +1856,4 @@ void __cdecl UVAtlasDebugPrintf(unsigned int lvl, const char* szFormat, ...)
OutputDebugStringA(strB);
}
#endif // _DEBUG
#endif // _WIN32 && _DEBUG

View File

@ -90,12 +90,22 @@ jobs:
}
- task: CMake@1
displayName: CMake UVAtlas
displayName: CMake UVAtlas (Config) dbg
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: -B out -DCMAKE_PREFIX_PATH=$(DEST_DIR)usr/local/share;$(DEST_DIR)usr/local/cmake
cmakeArgs: -B out -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$(DEST_DIR)usr/local/share;$(DEST_DIR)usr/local/cmake
- task: CMake@1
displayName: CMake UVAtlas (Build)
displayName: CMake UVAtlas (Build) dbg
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out -v
- task: CMake@1
displayName: CMake UVAtlas (Config) rel
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(DEST_DIR)usr/local/share;$(DEST_DIR)usr/local/cmake
- task: CMake@1
displayName: CMake UVAtlas (Build) rel
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out2 -v

View File

@ -90,12 +90,22 @@ jobs:
}
- task: CMake@1
displayName: CMake UVAtlas
displayName: CMake UVAtlas (Config) dbg
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: -B out -DCMAKE_PREFIX_PATH=$(DEST_DIR)usr/local/share;$(DEST_DIR)usr/local/cmake
cmakeArgs: -B out -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$(DEST_DIR)usr/local/share;$(DEST_DIR)usr/local/cmake
- task: CMake@1
displayName: CMake UVAtlas (Build)
displayName: CMake UVAtlas (Build) dbg
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out -v
- task: CMake@1
displayName: CMake UVAtlas (Config) rel
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(DEST_DIR)usr/local/share;$(DEST_DIR)usr/local/cmake
- task: CMake@1
displayName: CMake UVAtlas (Build) rel
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out2 -v