From 471bd9423526ee07ca0ecda475346c147b3578bb Mon Sep 17 00:00:00 2001 From: Karl Schultz Date: Fri, 2 Sep 2016 10:17:05 -0600 Subject: [PATCH] build: gh672 Fix CMake CXX_FLAGS inheritance Some sub-projects were overwriting CMAKE_CXX_FLAGS instead of inheriting from the parent. This keeps any user settings outside or above the top CMakeLists.txt file from reaching these sub-projects. These fixes include preserving the inheritance, adding extra flags to turn off warnings (mostly in autogen code) because the top level turns on Wall, and trivial code fixes to avoid the need to add a setting to turn off a warning for those trivial fixes. These changes should have no impact on Windows. Change-Id: I0c3c175cb5058f26a259ee3f4fde9fdaf3e6b00d --- layers/CMakeLists.txt | 5 ++--- layers/parameter_validation.cpp | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt index 9d6705b..9a9b4d4 100644 --- a/layers/CMakeLists.txt +++ b/layers/CMakeLists.txt @@ -98,9 +98,8 @@ if (WIN32) set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_CRT_SECURE_NO_WARNINGS /bigobj") set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_CRT_SECURE_NO_WARNINGS /bigobj") else() - set (CMAKE_CXX_FLAGS "-std=c++11") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpointer-arith") - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpointer-arith -Wno-unused-function -Wno-sign-compare") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith -Wno-unused-function -Wno-sign-compare") endif() add_custom_command(OUTPUT vk_dispatch_table_helper.h diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index 376bc77..bf45285 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -4951,6 +4951,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXlibPresentationSupportKHR(VkPhy result = get_dispatch_table(pc_instance_table_map, physicalDevice) ->GetPhysicalDeviceXlibPresentationSupportKHR(physicalDevice, queueFamilyIndex, dpy, visualID); } + return result; } #endif // VK_USE_PLATFORM_XLIB_KHR -- 2.7.4