aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Schultz <karl@lunarg.com>2016-09-02 10:17:05 -0600
committerKarl Schultz <karl@lunarg.com>2016-09-02 10:17:05 -0600
commit471bd9423526ee07ca0ecda475346c147b3578bb (patch)
tree588dbd94085e25327665713c3c33d4523276c23a
parentec09bfcbded9a16a45bba431e02fa800da0a12d3 (diff)
downloadusermoji-471bd9423526ee07ca0ecda475346c147b3578bb.tar.xz
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
-rw-r--r--layers/CMakeLists.txt5
-rw-r--r--layers/parameter_validation.cpp1
2 files changed, 3 insertions, 3 deletions
diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt
index 9d6705b8..9a9b4d46 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 376bc77a..bf452851 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