mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-21 20:00:11 +00:00
Silent warnings on unused variables in some tests; make test UniqueHandleDefaultArguments part of the solution for 64 bit only. (#1704)
This commit is contained in:
parent
5b6f6faf7a
commit
3e0d722ca5
@ -15,6 +15,16 @@
|
|||||||
// VulkanHpp Samples : ArrayProxy
|
// VulkanHpp Samples : ArrayProxy
|
||||||
// Compile test on using vk::ArrayProxy
|
// Compile test on using vk::ArrayProxy
|
||||||
|
|
||||||
|
#if defined( _MSC_VER )
|
||||||
|
// no need to ignore any warnings with MSVC
|
||||||
|
#elif defined( __clang__ )
|
||||||
|
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||||
|
#elif defined( __GNUC__ )
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||||
|
#else
|
||||||
|
// unknow compiler... just ignore the warnings for yourselves ;)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vulkan/vulkan.hpp>
|
#include <vulkan/vulkan.hpp>
|
||||||
#if ( 20 <= VULKAN_HPP_CPP_VERSION )
|
#if ( 20 <= VULKAN_HPP_CPP_VERSION )
|
||||||
|
@ -69,15 +69,15 @@ std::vector<int> const getConstVector()
|
|||||||
return { 1, 2 };
|
return { 1, 2 };
|
||||||
}
|
}
|
||||||
|
|
||||||
std::initializer_list<int> getInitializerList()
|
//std::initializer_list<int> getInitializerList()
|
||||||
{
|
//{
|
||||||
return { 1, 2 };
|
// return { 1, 2 };
|
||||||
}
|
//}
|
||||||
|
|
||||||
std::initializer_list<int> const getConstInitializerList()
|
//std::initializer_list<int> const getConstInitializerList()
|
||||||
{
|
//{
|
||||||
return { 1, 2 };
|
// return { 1, 2 };
|
||||||
}
|
//}
|
||||||
|
|
||||||
int main( int /*argc*/, char ** /*argv*/ )
|
int main( int /*argc*/, char ** /*argv*/ )
|
||||||
{
|
{
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
add_subdirectory( ArrayProxy )
|
add_subdirectory( ArrayProxy )
|
||||||
add_subdirectory( ArrayProxyNoTemporaries )
|
add_subdirectory( ArrayProxyNoTemporaries )
|
||||||
add_subdirectory( ArrayWrapper )
|
add_subdirectory( ArrayWrapper )
|
||||||
|
if( VULKAN_HPP_ENABLE_CPP20_MODULES )
|
||||||
|
add_subdirectory( Cpp20Modules )
|
||||||
|
endif()
|
||||||
add_subdirectory( DesignatedInitializers )
|
add_subdirectory( DesignatedInitializers )
|
||||||
add_subdirectory( DeviceFunctions )
|
add_subdirectory( DeviceFunctions )
|
||||||
add_subdirectory( DispatchLoaderDynamic )
|
add_subdirectory( DispatchLoaderDynamic )
|
||||||
@ -31,7 +34,6 @@ add_subdirectory( NoExceptions )
|
|||||||
add_subdirectory( StridedArrayProxy )
|
add_subdirectory( StridedArrayProxy )
|
||||||
add_subdirectory( StructureChain )
|
add_subdirectory( StructureChain )
|
||||||
add_subdirectory( UniqueHandle )
|
add_subdirectory( UniqueHandle )
|
||||||
add_subdirectory( UniqueHandleDefaultArguments )
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
if( VULKAN_HPP_ENABLE_CPP20_MODULES )
|
add_subdirectory( UniqueHandleDefaultArguments )
|
||||||
add_subdirectory( Cpp20Modules )
|
|
||||||
endif()
|
endif()
|
||||||
|
@ -15,6 +15,16 @@
|
|||||||
// VulkanHpp Samples : StridedArrayProxy
|
// VulkanHpp Samples : StridedArrayProxy
|
||||||
// Compile test on using vk::StridedArrayProxy
|
// Compile test on using vk::StridedArrayProxy
|
||||||
|
|
||||||
|
#if defined( _MSC_VER )
|
||||||
|
// no need to ignore any warnings with MSVC
|
||||||
|
#elif defined( __clang__ )
|
||||||
|
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||||
|
#elif defined( __GNUC__ )
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||||
|
#else
|
||||||
|
// unknow compiler... just ignore the warnings for yourselves ;)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vulkan/vulkan.hpp>
|
#include <vulkan/vulkan.hpp>
|
||||||
#if ( 20 <= VULKAN_HPP_CPP_VERSION )
|
#if ( 20 <= VULKAN_HPP_CPP_VERSION )
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
//
|
//
|
||||||
// VulkanHpp Test: Compile only test for issue 467.
|
// VulkanHpp Test: Compile only test for issue 467.
|
||||||
|
|
||||||
|
// Should be used on 64 bit only, as on 32 bit the test is ambiguous.
|
||||||
|
|
||||||
#define VULKAN_HPP_NO_EXCEPTIONS
|
#define VULKAN_HPP_NO_EXCEPTIONS
|
||||||
#define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1
|
#define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1
|
||||||
|
|
||||||
@ -21,12 +23,9 @@
|
|||||||
|
|
||||||
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
|
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
|
||||||
|
|
||||||
#if defined( __x86_64__ ) || defined( _M_X64 )
|
|
||||||
// On 32-bit systems the test is ambiguous.
|
|
||||||
int main( int /*argc*/, char ** /*argv*/ )
|
int main( int /*argc*/, char ** /*argv*/ )
|
||||||
{
|
{
|
||||||
VkSurfaceKHR surface = 0;
|
VkSurfaceKHR surface = 0;
|
||||||
auto uniqueSurface = vk::UniqueSurfaceKHR( surface, vk::Instance() );
|
auto uniqueSurface = vk::UniqueSurfaceKHR( surface, vk::Instance() );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user