Fix extra warnings in Android build

This commit is contained in:
PouleyKetchoupp 2020-04-10 10:32:11 +02:00
parent 74d4321172
commit 802bbe87ad
4 changed files with 17 additions and 9 deletions

View File

@ -57,7 +57,7 @@ matrix:
- name: Android export template (release_debug, Clang)
stage: build
env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="werror=yes"
env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
os: linux
compiler: clang
addons:

View File

@ -14,6 +14,14 @@ if env["platform"] == "android":
thirdparty_dir + "/layers/generated",
]
env.Prepend(CPPPATH=thirdparty_includes)
# Build Vulkan memory allocator
env_thirdparty = env.Clone()
env_thirdparty.disable_warnings()
thirdparty_dir = "#thirdparty/vulkan"
vma_sources = [thirdparty_dir + "/android/vk_mem_alloc.cpp"]
env_thirdparty.add_source_files(env.drivers_sources, vma_sources)
elif env["builtin_vulkan"]:
# Use bundled Vulkan headers
thirdparty_dir = "#thirdparty/vulkan"

View File

@ -31,14 +31,6 @@
#include "vulkan_context_android.h"
#include <vulkan/vulkan_android.h>
#define VMA_IMPLEMENTATION
#ifdef DEBUG_ENABLED
#ifndef _DEBUG
#define _DEBUG
#endif
#endif
#include <vk_mem_alloc.h>
const char *VulkanContextAndroid::_get_platform_surface_extension() const {
return VK_KHR_ANDROID_SURFACE_EXTENSION_NAME;
}

View File

@ -0,0 +1,8 @@
#define VMA_IMPLEMENTATION
#ifdef DEBUG_ENABLED
#ifndef _DEBUG
#define _DEBUG
#endif
#endif
// Include memory allocator from Android NDK
#include <vk_mem_alloc.h>