Skip to content

Commit

Permalink
Deprecate vk_sdk_platform.h
Browse files Browse the repository at this point in the history
closes #316
  • Loading branch information
juan-lunarg committed Jan 5, 2023
1 parent 24115c7 commit 18963a6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/vulkan/vk_sdk_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@
*/
#pragma once

// Allow users to suppress warnings generated by this header file by defining VK_SDK_PLATFORM_SUPRRESS_DEPRECATION_WARNING
#ifndef VK_SDK_PLATFORM_SUPRRESS_DEPRECATION_WARNING

#if defined(__GNUC__) && __GNUC__ >= 4
#warning "vk_sdk_platform.h is deprecated and will be removed in future release! Use VK_SDK_PLATFORM_SUPRRESS_DEPRECATION_WARNING to suppress warning!"
#endif

// MSVC doesn't support warning directive
#if defined(_MSC_VER)
#pragma message("vk_sdk_platform.h is deprecated and will be removed in future release! Use VK_SDK_PLATFORM_SUPRRESS_DEPRECATION_WARNING to suppress warning!")
#endif

#endif

#if defined(_WIN32)
#ifndef NOMINMAX
#define NOMINMAX
Expand Down
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ target_link_libraries(vk_layer PRIVATE Vulkan::Headers)
# vk_sdk_platform.h
add_executable(vk_sdk_platform vk_sdk_platform.c)
target_link_libraries(vk_sdk_platform PRIVATE Vulkan::Headers)
target_compile_definitions(vk_sdk_platform PRIVATE VK_SDK_PLATFORM_SUPRRESS_DEPRECATION_WARNING)

0 comments on commit 18963a6

Please sign in to comment.