mirror of
https://github.com/microsoft/DirectXTex
synced 2024-11-21 12:00:06 +00:00
Fix warnings in tools for MinGW (#428)
This commit is contained in:
parent
187f6d64a8
commit
a3d032b8a6
@ -370,9 +370,9 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/DirectXTex.pc"
|
|||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||||
|
|
||||||
#--- Command-line tools
|
#--- Command-line tools
|
||||||
if(BUILD_TOOLS AND BUILD_DX11 AND WIN32)
|
set(TOOL_EXES "")
|
||||||
set(TOOL_EXES texassemble texconv texdiag)
|
|
||||||
|
|
||||||
|
if(BUILD_TOOLS AND WIN32)
|
||||||
add_executable(texassemble
|
add_executable(texassemble
|
||||||
Texassemble/texassemble.cpp
|
Texassemble/texassemble.cpp
|
||||||
Texassemble/texassemble.rc
|
Texassemble/texassemble.rc
|
||||||
@ -380,7 +380,10 @@ if(BUILD_TOOLS AND BUILD_DX11 AND WIN32)
|
|||||||
Texassemble/AnimatedGif.cpp)
|
Texassemble/AnimatedGif.cpp)
|
||||||
target_link_libraries(texassemble PRIVATE ${PROJECT_NAME} ole32.lib version.lib)
|
target_link_libraries(texassemble PRIVATE ${PROJECT_NAME} ole32.lib version.lib)
|
||||||
source_group(texassemble REGULAR_EXPRESSION Texassemble/*.*)
|
source_group(texassemble REGULAR_EXPRESSION Texassemble/*.*)
|
||||||
|
list(APPEND TOOL_EXES texassemble)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_TOOLS AND BUILD_DX11 AND WIN32)
|
||||||
add_executable(texconv
|
add_executable(texconv
|
||||||
Texconv/texconv.cpp
|
Texconv/texconv.cpp
|
||||||
Texconv/texconv.rc
|
Texconv/texconv.rc
|
||||||
@ -389,18 +392,24 @@ if(BUILD_TOOLS AND BUILD_DX11 AND WIN32)
|
|||||||
Texconv/PortablePixMap.cpp)
|
Texconv/PortablePixMap.cpp)
|
||||||
target_link_libraries(texconv PRIVATE ${PROJECT_NAME} ole32.lib shell32.lib version.lib)
|
target_link_libraries(texconv PRIVATE ${PROJECT_NAME} ole32.lib shell32.lib version.lib)
|
||||||
source_group(texconv REGULAR_EXPRESSION Texconv/*.*)
|
source_group(texconv REGULAR_EXPRESSION Texconv/*.*)
|
||||||
|
list(APPEND TOOL_EXES texconv)
|
||||||
|
|
||||||
|
if(BC_USE_OPENMP)
|
||||||
|
target_link_libraries(texconv PRIVATE OpenMP::OpenMP_CXX)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_TOOLS AND WIN32)
|
||||||
add_executable(texdiag
|
add_executable(texdiag
|
||||||
Texdiag/texdiag.cpp
|
Texdiag/texdiag.cpp
|
||||||
Texdiag/texdiag.rc
|
Texdiag/texdiag.rc
|
||||||
Texdiag/settings.manifest)
|
Texdiag/settings.manifest)
|
||||||
target_link_libraries(texdiag PRIVATE ${PROJECT_NAME} ole32.lib version.lib)
|
target_link_libraries(texdiag PRIVATE ${PROJECT_NAME} ole32.lib version.lib)
|
||||||
source_group(texdiag REGULAR_EXPRESSION Texdiag/*.*)
|
source_group(texdiag REGULAR_EXPRESSION Texdiag/*.*)
|
||||||
|
list(APPEND TOOL_EXES texdiag)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(BC_USE_OPENMP)
|
if(BUILD_TOOLS AND WIN32)
|
||||||
target_link_libraries(texconv PRIVATE OpenMP::OpenMP_CXX)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(ENABLE_OPENEXR_SUPPORT)
|
if(ENABLE_OPENEXR_SUPPORT)
|
||||||
foreach(t IN LISTS TOOL_EXES)
|
foreach(t IN LISTS TOOL_EXES)
|
||||||
target_include_directories(${t} PRIVATE Auxiliary)
|
target_include_directories(${t} PRIVATE Auxiliary)
|
||||||
|
@ -1011,12 +1011,16 @@ namespace DirectX
|
|||||||
#pragma clang diagnostic ignored "-Wswitch-enum"
|
#pragma clang diagnostic ignored "-Wswitch-enum"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4619 4616 4061)
|
#pragma warning(disable : 4619 4616 4061)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "DirectXTex.inl"
|
#include "DirectXTex.inl"
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
|
@ -13,8 +13,10 @@
|
|||||||
// http://go.microsoft.com/fwlink/?LinkId=248926
|
// http://go.microsoft.com/fwlink/?LinkId=248926
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4005)
|
#pragma warning(disable : 4005)
|
||||||
|
#endif
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#define NODRAWTEXT
|
#define NODRAWTEXT
|
||||||
@ -22,7 +24,9 @@
|
|||||||
#define NOMCX
|
#define NOMCX
|
||||||
#define NOSERVICE
|
#define NOSERVICE
|
||||||
#define NOHELP
|
#define NOHELP
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
@ -35,7 +39,9 @@
|
|||||||
|
|
||||||
#include <wincodec.h>
|
#include <wincodec.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable : 4619 4616 26812)
|
#pragma warning(disable : 4619 4616 26812)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "DirectXTex.h"
|
#include "DirectXTex.h"
|
||||||
|
|
||||||
|
@ -9,8 +9,10 @@
|
|||||||
// http://go.microsoft.com/fwlink/?LinkId=248926
|
// http://go.microsoft.com/fwlink/?LinkId=248926
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4005)
|
#pragma warning(disable : 4005)
|
||||||
|
#endif
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#define NODRAWTEXT
|
#define NODRAWTEXT
|
||||||
@ -18,7 +20,9 @@
|
|||||||
#define NOMCX
|
#define NOMCX
|
||||||
#define NOSERVICE
|
#define NOSERVICE
|
||||||
#define NOHELP
|
#define NOHELP
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if __cplusplus < 201703L
|
#if __cplusplus < 201703L
|
||||||
#error Requires C++17 (and /Zc:__cplusplus with MSVC)
|
#error Requires C++17 (and /Zc:__cplusplus with MSVC)
|
||||||
@ -52,7 +56,9 @@
|
|||||||
#include <DirectXPackedVector.h>
|
#include <DirectXPackedVector.h>
|
||||||
#include <wincodec.h>
|
#include <wincodec.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable : 4619 4616 26812)
|
#pragma warning(disable : 4619 4616 26812)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "DirectXTex.h"
|
#include "DirectXTex.h"
|
||||||
|
|
||||||
|
@ -12,15 +12,19 @@
|
|||||||
// http://go.microsoft.com/fwlink/?LinkId=248926
|
// http://go.microsoft.com/fwlink/?LinkId=248926
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4005)
|
#pragma warning(disable : 4005)
|
||||||
|
#endif
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#define NODRAWTEXT
|
#define NODRAWTEXT
|
||||||
#define NOMCX
|
#define NOMCX
|
||||||
#define NOSERVICE
|
#define NOSERVICE
|
||||||
#define NOHELP
|
#define NOHELP
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
|
@ -9,15 +9,19 @@
|
|||||||
// http://go.microsoft.com/fwlink/?LinkId=248926
|
// http://go.microsoft.com/fwlink/?LinkId=248926
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4005)
|
#pragma warning(disable : 4005)
|
||||||
|
#endif
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#define NODRAWTEXT
|
#define NODRAWTEXT
|
||||||
#define NOMCX
|
#define NOMCX
|
||||||
#define NOSERVICE
|
#define NOSERVICE
|
||||||
#define NOHELP
|
#define NOHELP
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
|
@ -9,15 +9,19 @@
|
|||||||
// http://go.microsoft.com/fwlink/?LinkId=248926
|
// http://go.microsoft.com/fwlink/?LinkId=248926
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4005)
|
#pragma warning(disable : 4005)
|
||||||
|
#endif
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#define NODRAWTEXT
|
#define NODRAWTEXT
|
||||||
#define NOMCX
|
#define NOMCX
|
||||||
#define NOSERVICE
|
#define NOSERVICE
|
||||||
#define NOHELP
|
#define NOHELP
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <ShlObj.h>
|
#include <ShlObj.h>
|
||||||
|
|
||||||
@ -52,7 +56,9 @@
|
|||||||
|
|
||||||
#include <wincodec.h>
|
#include <wincodec.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable : 4619 4616 26812)
|
#pragma warning(disable : 4619 4616 26812)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "DirectXTex.h"
|
#include "DirectXTex.h"
|
||||||
|
|
||||||
@ -525,7 +531,9 @@ HRESULT __cdecl SaveToPortablePixMapHDR(
|
|||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning( disable : 4616 6211 )
|
#pragma warning( disable : 4616 6211 )
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
@ -9,8 +9,10 @@
|
|||||||
// http://go.microsoft.com/fwlink/?LinkId=248926
|
// http://go.microsoft.com/fwlink/?LinkId=248926
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4005)
|
#pragma warning(disable : 4005)
|
||||||
|
#endif
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#define NODRAWTEXT
|
#define NODRAWTEXT
|
||||||
@ -18,7 +20,9 @@
|
|||||||
#define NOMCX
|
#define NOMCX
|
||||||
#define NOSERVICE
|
#define NOSERVICE
|
||||||
#define NOHELP
|
#define NOHELP
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if __cplusplus < 201703L
|
#if __cplusplus < 201703L
|
||||||
#error Requires C++17 (and /Zc:__cplusplus with MSVC)
|
#error Requires C++17 (and /Zc:__cplusplus with MSVC)
|
||||||
@ -46,7 +50,9 @@
|
|||||||
|
|
||||||
#include <dxgiformat.h>
|
#include <dxgiformat.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable : 4619 4616 26812)
|
#pragma warning(disable : 4619 4616 26812)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "DirectXTex.h"
|
#include "DirectXTex.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user