Hotfix for CMake switch order (#148)

This commit is contained in:
Chuck Walbourn 2024-02-23 12:46:56 -08:00 committed by GitHub
parent 6e9b60f3de
commit 12a24389af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 19 deletions

View File

@ -9,6 +9,7 @@ Release available for download on [GitHub](https://github.com/microsoft/UVAtlas/
### February 21, 2024
* CMake project updates and refactor
* Minor code review for Clang, MinGW, and Intel compilers
* uvatlastool: Updated for February 2024 DirectXTex & DirectXMesh releases
### December 31, 2023
* CMake project updates including pkg-config file generation

View File

@ -308,14 +308,14 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\directxmesh_desktop_2019.2024.1.1.1\build\native\directxmesh_desktop_2019.targets" Condition="Exists('..\packages\directxmesh_desktop_2019.2024.1.1.1\build\native\directxmesh_desktop_2019.targets')" />
<Import Project="..\packages\directxtex_desktop_2019.2024.1.1.1\build\native\directxtex_desktop_2019.targets" Condition="Exists('..\packages\directxtex_desktop_2019.2024.1.1.1\build\native\directxtex_desktop_2019.targets')" />
<Import Project="..\packages\directxmesh_desktop_2019.2024.2.22.1\build\native\directxmesh_desktop_2019.targets" Condition="Exists('..\packages\directxmesh_desktop_2019.2024.2.22.1\build\native\directxmesh_desktop_2019.targets')" />
<Import Project="..\packages\directxtex_desktop_2019.2024.2.22.1\build\native\directxtex_desktop_2019.targets" Condition="Exists('..\packages\directxtex_desktop_2019.2024.2.22.1\build\native\directxtex_desktop_2019.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\directxmesh_desktop_2019.2024.1.1.1\build\native\directxmesh_desktop_2019.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\directxmesh_desktop_2019.2024.1.1.1\build\native\directxmesh_desktop_2019.targets'))" />
<Error Condition="!Exists('..\packages\directxtex_desktop_2019.2024.1.1.1\build\native\directxtex_desktop_2019.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\directxtex_desktop_2019.2024.1.1.1\build\native\directxtex_desktop_2019.targets'))" />
<Error Condition="!Exists('..\packages\directxmesh_desktop_2019.2024.2.22.1\build\native\directxmesh_desktop_2019.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\directxmesh_desktop_2019.2024.2.22.1\build\native\directxmesh_desktop_2019.targets'))" />
<Error Condition="!Exists('..\packages\directxtex_desktop_2019.2024.2.22.1\build\native\directxtex_desktop_2019.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\directxtex_desktop_2019.2024.2.22.1\build\native\directxtex_desktop_2019.targets'))" />
</Target>
</Project>

View File

@ -314,14 +314,14 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\directxmesh_desktop_2019.2024.1.1.1\build\native\directxmesh_desktop_2019.targets" Condition="Exists('..\packages\directxmesh_desktop_2019.2024.1.1.1\build\native\directxmesh_desktop_2019.targets')" />
<Import Project="..\packages\directxtex_desktop_2019.2024.1.1.1\build\native\directxtex_desktop_2019.targets" Condition="Exists('..\packages\directxtex_desktop_2019.2024.1.1.1\build\native\directxtex_desktop_2019.targets')" />
<Import Project="..\packages\directxmesh_desktop_2019.2024.2.22.1\build\native\directxmesh_desktop_2019.targets" Condition="Exists('..\packages\directxmesh_desktop_2019.2024.2.22.1\build\native\directxmesh_desktop_2019.targets')" />
<Import Project="..\packages\directxtex_desktop_2019.2024.2.22.1\build\native\directxtex_desktop_2019.targets" Condition="Exists('..\packages\directxtex_desktop_2019.2024.2.22.1\build\native\directxtex_desktop_2019.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\directxmesh_desktop_2019.2024.1.1.1\build\native\directxmesh_desktop_2019.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\directxmesh_desktop_2019.2024.1.1.1\build\native\directxmesh_desktop_2019.targets'))" />
<Error Condition="!Exists('..\packages\directxtex_desktop_2019.2024.1.1.1\build\native\directxtex_desktop_2019.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\directxtex_desktop_2019.2024.1.1.1\build\native\directxtex_desktop_2019.targets'))" />
<Error Condition="!Exists('..\packages\directxmesh_desktop_2019.2024.2.22.1\build\native\directxmesh_desktop_2019.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\directxmesh_desktop_2019.2024.2.22.1\build\native\directxmesh_desktop_2019.targets'))" />
<Error Condition="!Exists('..\packages\directxtex_desktop_2019.2024.2.22.1\build\native\directxtex_desktop_2019.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\directxtex_desktop_2019.2024.2.22.1\build\native\directxtex_desktop_2019.targets'))" />
</Target>
</Project>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="directxmesh_desktop_2019" version="2024.1.1.1" targetFramework="native" />
<package id="directxtex_desktop_2019" version="2024.1.1.1" targetFramework="native" />
<package id="directxmesh_desktop_2019" version="2024.2.22.1" targetFramework="native" />
<package id="directxtex_desktop_2019" version="2024.2.22.1" targetFramework="native" />
</packages>

View File

@ -81,12 +81,12 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
if(CMAKE_INTERPROCEDURAL_OPTIMIZATION)
message(STATUS "Building using Whole Program Optimization")
list(APPEND /Gy /Gw)
list(APPEND COMPILER_SWITCHES /Gy /Gw)
endif()
if(OpenMP_CXX_FOUND)
# OpenMP in MSVC is not compatible with /permissive- unless you disable two-phase lookup
list(APPEND /Zc:twoPhase-)
list(APPEND COMPILER_SWITCHES /Zc:twoPhase-)
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.24)
@ -95,9 +95,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.26)
AND (NOT (XBOX_CONSOLE_TARGET STREQUAL "durango")))
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE /Zc:preprocessor /wd5104 /wd5105)
endforeach()
list(APPEND COMPILER_SWITCHES /Zc:preprocessor /wd5104 /wd5105)
endif()
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.27) AND (NOT (${DIRECTX_ARCH} MATCHES "^arm")))
@ -110,10 +108,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.31)
AND (XBOX_CONSOLE_TARGET STREQUAL "durango"))
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE /Zc:static_assert-)
endforeach()
list(APPEND COMPILER_SWITCHES /Zc:static_assert-)
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.35)