Skip to content

Commit

Permalink
More cmake updates
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Aug 17, 2024
1 parent 3dde11e commit 863fd31
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
endforeach()
endif()

set(WarningsEXE "/wd4061" "/wd4062" "/wd4365" "/wd4514" "/wd4625" "/wd4626" "/wd4627" "/wd4668" "/wd4710" "/wd4711" "/wd4751" "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd5045" "/wd5219")
set(WarningsEXE "/wd4061" "/wd4062" "/wd4365" "/wd4514" "/wd4571" "/wd4625" "/wd4626" "/wd4627" "/wd4668" "/wd4710" "/wd4711" "/wd4751" "/wd4774" "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd5045" "/wd5219")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.34)
list(APPEND WarningsEXE "/wd5262" "/wd5264")
endif()
Expand Down
3 changes: 2 additions & 1 deletion Texconv/PortablePixMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#pragma warning(disable : 4005)
#endif
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#define NOMINMAX 1
#define NODRAWTEXT
#define NOMCX
#define NOSERVICE
Expand All @@ -25,6 +25,7 @@

#include <Windows.h>

#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <cstdio>
Expand Down
4 changes: 4 additions & 0 deletions build/CompilerAndLinker.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
list(APPEND COMPILER_SWITCHES /Zc:lambda)
endif()

if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.29)
list(APPEND COMPILER_SWITCHES /external:W4)
endif()

if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.31)
AND (XBOX_CONSOLE_TARGET STREQUAL "durango"))
list(APPEND COMPILER_SWITCHES /Zc:static_assert-)
Expand Down

0 comments on commit 863fd31

Please sign in to comment.