Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 0.20240321.x
  • main
  • v0.20231013.x
  • wip/case_insensitive_fs
  • wip/denittis/line_based
  • wip/denittis/portal_helper
  • wip/denittis/t17372
  • wip/denittis/t20052
  • wip/denittis/t20177
  • wip/denittis/t7017
  • wip/denittis/tasks239
  • wip/denittis/up_libcapsule
  • wip/diagnose-task724
  • wip/fix_archlinux_ci
  • wip/flatpak_exports_for_run_host
  • wip/gameoverlayrenderer
  • wip/input-device-diagnostic
  • wip/input-portal
  • wip/issue18
  • wip/luigipiucco/nixos
  • wip/protected/ci
  • wip/protected/scout-on-soldier
  • wip/protected/smcv-ci
  • wip/protected/smcv-merge-slr
  • wip/protected/task679
  • wip/refi64/check-steam-running
  • wip/refi64/ci-coverage-demo
  • wip/refi64/mr_template_test
  • wip/refi64/openxr
  • wip/refi64/openxr-sysinfo
  • wip/refi64/vk-layers
  • wip/regenerate-ldso-cache
  • wip/shorten_socket
  • wip/smcv/always-copy-runtime
  • wip/smcv/ci
  • wip/smcv/clang
  • wip/smcv/delete-in-background
  • wip/smcv/dev-lib-symlinks
  • wip/smcv/diagnose-sfl10602
  • wip/smcv/diffable
  • wip/smcv/doc
  • wip/smcv/docs
  • wip/smcv/fex-3
  • wip/smcv/gcc11
  • wip/smcv/guessed-library-arch
  • wip/smcv/inspect-library
  • wip/smcv/into-library
  • wip/smcv/ld-so-wrapper
  • wip/smcv/lxc
  • wip/smcv/no-nvidia-pkcs11
  • wip/smcv/pv-wrap-to-journal
  • wip/smcv/refcount-locks
  • wip/smcv/relocatable-bin
  • wip/smcv/spawn-really-async
  • wip/smcv/staging
  • wip/smcv/steam-portal
  • wip/smcv/task149-nonfhs
  • wip/smcv/task212-basename
  • wip/smcv/task370-debug
  • wip/smcv/test-diagnostics
  • wip/smcv/variant-init-statically
  • wip/smcv/vulkan-1-1
  • wip/sr640
  • wip/sr684
  • wip/task293-v1
  • wip/task342-3
  • wip/task466
  • wip/task466-more
  • wip/task481-test
  • wip/task488-test
  • wip/task595
  • wip/task634
  • wip/task647
  • wip/task88
  • wip/task88-pre
  • wip/vulkan_shaders
  • wip/xytovl/openxr
  • pressure-vessel-v0.20180430.0
  • pressure-vessel-v0.20180517.0
  • pressure-vessel-v0.20180517.1
  • pressure-vessel-v0.20180518.0
  • pressure-vessel-v0.20180518.1
  • pressure-vessel-v0.20190510.0
  • pressure-vessel-v0.20190815.0
  • pressure-vessel-v0.20190819.0
  • pressure-vessel-v0.20190820.0
  • pressure-vessel-v0.20190822.0
  • pressure-vessel-v0.20190823.0
  • pressure-vessel-v0.20190912.0
  • pressure-vessel-v0.20190926.0
  • pressure-vessel-v0.20190927.0
  • pressure-vessel-v0.20191112.0
  • pressure-vessel-v0.20191112.1
  • pressure-vessel-v0.20191115.0
  • pressure-vessel-v0.20191216.0
  • pressure-vessel-v0.20200108.0
  • pressure-vessel-v0.20200331.0
  • pressure-vessel-v0.20200624.0
  • pressure-vessel-v0.20200708.0
  • pressure-vessel-v0.20200709.0
  • pressure-vessel-v0.20200805.0
  • pressure-vessel-v0.20200819.0
  • pressure-vessel-v0.20200908.0
  • pressure-vessel-v0.20200909.0
  • steamrt/0.20190926.0-0+steamrt1.2
  • v0.20190717.0
  • v0.20190801.0
  • v0.20190802.0
  • v0.20190806.0
  • v0.20190816.0
  • v0.20190820.0
  • v0.20190820.1
  • v0.20190822.0
  • v0.20190909.0
  • v0.20190926.0
  • v0.20190926.1
  • v0.20191024.0
  • v0.20191120.0
  • v0.20191205.0
  • v0.20191209.0
  • v0.20200108.0
  • v0.20200109.0
  • v0.20200306.0
  • v0.20200331.0
  • v0.20200331.1
  • v0.20200415.0
  • v0.20200624.0
  • v0.20200908.0
  • v0.20200908.1
  • v0.20200914.0
  • v0.20201002.0
  • v0.20201007.0
  • v0.20201022.0
  • v0.20201124.0
  • v0.20201203.0
  • v0.20210105.0
  • v0.20210114.0
  • v0.20210126.0
  • v0.20210201.0
  • v0.20210203.0
  • v0.20210305.0
  • v0.20210312.0
  • v0.20210317.0
  • v0.20210331.0
  • v0.20210415.0
  • v0.20210430.0
  • v0.20210518.0
  • v0.20210608.0
  • v0.20210608.1
  • v0.20210608.2
  • v0.20210608.3
  • v0.20210617.0
  • v0.20210617.1
  • v0.20210630.0
  • v0.20210722.0
  • v0.20210806.0
  • v0.20210809.0
  • v0.20210809.1
  • v0.20210820.0
  • v0.20210906.0
  • v0.20210906.1
  • v0.20210906.2
  • v0.20211027.0
  • v0.20211207.0
  • v0.20220107.0
  • v0.20220111.0
  • v0.20220119.0
  • v0.20220131.0
  • v0.20220311.0
  • v0.20220315.0
  • v0.20220420.0
  • v0.20220601.0
  • v0.20220620.0
  • v0.20220624.0
  • v0.20220725.0
  • v0.20220725.1
  • v0.20220726.0
177 results

Target

Select target project
  • steamrt/steam-runtime-tools
1 result
Select Git revision
  • 0.20240321.x
  • main
  • v0.20231013.x
  • wip/case_insensitive_fs
  • wip/denittis/line_based
  • wip/denittis/portal_helper
  • wip/denittis/t17372
  • wip/denittis/t20052
  • wip/denittis/t20177
  • wip/denittis/t7017
  • wip/denittis/tasks239
  • wip/denittis/up_libcapsule
  • wip/diagnose-task724
  • wip/fix_archlinux_ci
  • wip/flatpak_exports_for_run_host
  • wip/gameoverlayrenderer
  • wip/input-device-diagnostic
  • wip/input-portal
  • wip/issue18
  • wip/luigipiucco/nixos
  • wip/protected/ci
  • wip/protected/scout-on-soldier
  • wip/protected/smcv-ci
  • wip/protected/smcv-merge-slr
  • wip/protected/task679
  • wip/refi64/check-steam-running
  • wip/refi64/ci-coverage-demo
  • wip/refi64/mr_template_test
  • wip/refi64/openxr
  • wip/refi64/openxr-sysinfo
  • wip/refi64/vk-layers
  • wip/regenerate-ldso-cache
  • wip/shorten_socket
  • wip/smcv/always-copy-runtime
  • wip/smcv/ci
  • wip/smcv/clang
  • wip/smcv/delete-in-background
  • wip/smcv/dev-lib-symlinks
  • wip/smcv/diagnose-sfl10602
  • wip/smcv/diffable
  • wip/smcv/doc
  • wip/smcv/docs
  • wip/smcv/fex-3
  • wip/smcv/gcc11
  • wip/smcv/guessed-library-arch
  • wip/smcv/inspect-library
  • wip/smcv/into-library
  • wip/smcv/ld-so-wrapper
  • wip/smcv/lxc
  • wip/smcv/no-nvidia-pkcs11
  • wip/smcv/pv-wrap-to-journal
  • wip/smcv/refcount-locks
  • wip/smcv/relocatable-bin
  • wip/smcv/spawn-really-async
  • wip/smcv/staging
  • wip/smcv/steam-portal
  • wip/smcv/task149-nonfhs
  • wip/smcv/task212-basename
  • wip/smcv/task370-debug
  • wip/smcv/test-diagnostics
  • wip/smcv/variant-init-statically
  • wip/smcv/vulkan-1-1
  • wip/sr640
  • wip/sr684
  • wip/task293-v1
  • wip/task342-3
  • wip/task466
  • wip/task466-more
  • wip/task481-test
  • wip/task488-test
  • wip/task595
  • wip/task634
  • wip/task647
  • wip/task88
  • wip/task88-pre
  • wip/vulkan_shaders
  • wip/xytovl/openxr
  • pressure-vessel-v0.20180430.0
  • pressure-vessel-v0.20180517.0
  • pressure-vessel-v0.20180517.1
  • pressure-vessel-v0.20180518.0
  • pressure-vessel-v0.20180518.1
  • pressure-vessel-v0.20190510.0
  • pressure-vessel-v0.20190815.0
  • pressure-vessel-v0.20190819.0
  • pressure-vessel-v0.20190820.0
  • pressure-vessel-v0.20190822.0
  • pressure-vessel-v0.20190823.0
  • pressure-vessel-v0.20190912.0
  • pressure-vessel-v0.20190926.0
  • pressure-vessel-v0.20190927.0
  • pressure-vessel-v0.20191112.0
  • pressure-vessel-v0.20191112.1
  • pressure-vessel-v0.20191115.0
  • pressure-vessel-v0.20191216.0
  • pressure-vessel-v0.20200108.0
  • pressure-vessel-v0.20200331.0
  • pressure-vessel-v0.20200624.0
  • pressure-vessel-v0.20200708.0
  • pressure-vessel-v0.20200709.0
  • pressure-vessel-v0.20200805.0
  • pressure-vessel-v0.20200819.0
  • pressure-vessel-v0.20200908.0
  • pressure-vessel-v0.20200909.0
  • steamrt/0.20190926.0-0+steamrt1.2
  • v0.20190717.0
  • v0.20190801.0
  • v0.20190802.0
  • v0.20190806.0
  • v0.20190816.0
  • v0.20190820.0
  • v0.20190820.1
  • v0.20190822.0
  • v0.20190909.0
  • v0.20190926.0
  • v0.20190926.1
  • v0.20191024.0
  • v0.20191120.0
  • v0.20191205.0
  • v0.20191209.0
  • v0.20200108.0
  • v0.20200109.0
  • v0.20200306.0
  • v0.20200331.0
  • v0.20200331.1
  • v0.20200415.0
  • v0.20200624.0
  • v0.20200908.0
  • v0.20200908.1
  • v0.20200914.0
  • v0.20201002.0
  • v0.20201007.0
  • v0.20201022.0
  • v0.20201124.0
  • v0.20201203.0
  • v0.20210105.0
  • v0.20210114.0
  • v0.20210126.0
  • v0.20210201.0
  • v0.20210203.0
  • v0.20210305.0
  • v0.20210312.0
  • v0.20210317.0
  • v0.20210331.0
  • v0.20210415.0
  • v0.20210430.0
  • v0.20210518.0
  • v0.20210608.0
  • v0.20210608.1
  • v0.20210608.2
  • v0.20210608.3
  • v0.20210617.0
  • v0.20210617.1
  • v0.20210630.0
  • v0.20210722.0
  • v0.20210806.0
  • v0.20210809.0
  • v0.20210809.1
  • v0.20210820.0
  • v0.20210906.0
  • v0.20210906.1
  • v0.20210906.2
  • v0.20211027.0
  • v0.20211207.0
  • v0.20220107.0
  • v0.20220111.0
  • v0.20220119.0
  • v0.20220131.0
  • v0.20220311.0
  • v0.20220315.0
  • v0.20220420.0
  • v0.20220601.0
  • v0.20220620.0
  • v0.20220624.0
  • v0.20220725.0
  • v0.20220725.1
  • v0.20220726.0
177 results
Show changes
Commits on Source (18)
...@@ -49,12 +49,23 @@ ubsan: ...@@ -49,12 +49,23 @@ ubsan:
clang-tools \ clang-tools \
${NULL+} ${NULL+}
rm -fr builddir
meson \
-Db_lundef=false \
-Db_sanitize=address,undefined \
--werror \
builddir
ninja -C builddir
meson test -C builddir -v
export CC=clang export CC=clang
export CXX=clang++
rm -fr builddir rm -fr builddir
meson \ meson \
-Db_lundef=false \ -Db_lundef=false \
-Db_sanitize=address,undefined \ -Db_sanitize=address,undefined \
--werror \
builddir builddir
ninja -C builddir scan-build ninja -C builddir scan-build
meson test -C builddir -v meson test -C builddir -v
...@@ -11,6 +11,12 @@ ifeq ($(shell dpkg --compare-versions `c++ -dumpversion || echo 0` ge 4.8 || ech ...@@ -11,6 +11,12 @@ ifeq ($(shell dpkg --compare-versions `c++ -dumpversion || echo 0` ge 4.8 || ech
export CXX = g++-4.8 export CXX = g++-4.8
endif endif
meson_options =
ifeq ($(DEB_DISTRIBUTION),UNRELEASED)
meson_options += --werror
endif
gtk_doc_has_cflags := $(shell \ gtk_doc_has_cflags := $(shell \
if gtkdoc-scangobj --help 2>&1 | grep '[-]-cflags' >/dev/null; then \ if gtkdoc-scangobj --help 2>&1 | grep '[-]-cflags' >/dev/null; then \
echo true; \ echo true; \
...@@ -42,7 +48,7 @@ override_dh_auto_configure: ...@@ -42,7 +48,7 @@ override_dh_auto_configure:
-Dgtk_doc=$(gtk_doc_has_cflags) \ -Dgtk_doc=$(gtk_doc_has_cflags) \
-Dintrospection=false \ -Dintrospection=false \
-Dmultiarch_tuple=$(DEB_HOST_MULTIARCH) \ -Dmultiarch_tuple=$(DEB_HOST_MULTIARCH) \
$(NULL) $(meson_options)
override_dh_auto_build: override_dh_auto_build:
ninja -C builddir ninja -C builddir
......
...@@ -783,50 +783,50 @@ private: ...@@ -783,50 +783,50 @@ private:
} }
} }
SwapChainSupportDetails querySwapChainSupport(VkPhysicalDevice device) { SwapChainSupportDetails querySwapChainSupport(VkPhysicalDevice dev) {
SwapChainSupportDetails details; SwapChainSupportDetails details;
vkGetPhysicalDeviceSurfaceCapabilitiesKHR(device, surface, &details.capabilities); vkGetPhysicalDeviceSurfaceCapabilitiesKHR(dev, surface, &details.capabilities);
uint32_t formatCount; uint32_t formatCount;
vkGetPhysicalDeviceSurfaceFormatsKHR(device, surface, &formatCount, nullptr); vkGetPhysicalDeviceSurfaceFormatsKHR(dev, surface, &formatCount, nullptr);
if (formatCount != 0) { if (formatCount != 0) {
details.formats.resize(formatCount); details.formats.resize(formatCount);
vkGetPhysicalDeviceSurfaceFormatsKHR(device, surface, &formatCount, details.formats.data()); vkGetPhysicalDeviceSurfaceFormatsKHR(dev, surface, &formatCount, details.formats.data());
} }
uint32_t presentModeCount; uint32_t presentModeCount;
vkGetPhysicalDeviceSurfacePresentModesKHR(device, surface, &presentModeCount, nullptr); vkGetPhysicalDeviceSurfacePresentModesKHR(dev, surface, &presentModeCount, nullptr);
if (presentModeCount != 0) { if (presentModeCount != 0) {
details.presentModes.resize(presentModeCount); details.presentModes.resize(presentModeCount);
vkGetPhysicalDeviceSurfacePresentModesKHR(device, surface, &presentModeCount, details.presentModes.data()); vkGetPhysicalDeviceSurfacePresentModesKHR(dev, surface, &presentModeCount, details.presentModes.data());
} }
return details; return details;
} }
bool isDeviceSuitable(VkPhysicalDevice device) { bool isDeviceSuitable(VkPhysicalDevice dev) {
QueueFamilyIndices indices = findQueueFamilies(device); QueueFamilyIndices indices = findQueueFamilies(dev);
bool extensionsSupported = checkDeviceExtensionSupport(device); bool extensionsSupported = checkDeviceExtensionSupport(dev);
bool swapChainAdequate = false; bool swapChainAdequate = false;
if (extensionsSupported) { if (extensionsSupported) {
SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); SwapChainSupportDetails swapChainSupport = querySwapChainSupport(dev);
swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
} }
return indices.isComplete() && extensionsSupported && swapChainAdequate; return indices.isComplete() && extensionsSupported && swapChainAdequate;
} }
bool checkDeviceExtensionSupport(VkPhysicalDevice device) { bool checkDeviceExtensionSupport(VkPhysicalDevice dev) {
uint32_t extensionCount; uint32_t extensionCount;
vkEnumerateDeviceExtensionProperties(device, nullptr, &extensionCount, nullptr); vkEnumerateDeviceExtensionProperties(dev, nullptr, &extensionCount, nullptr);
std::vector<VkExtensionProperties> availableExtensions(extensionCount); std::vector<VkExtensionProperties> availableExtensions(extensionCount);
vkEnumerateDeviceExtensionProperties(device, nullptr, &extensionCount, availableExtensions.data()); vkEnumerateDeviceExtensionProperties(dev, nullptr, &extensionCount, availableExtensions.data());
std::set<std::string> requiredExtensions(deviceExtensions.begin(), deviceExtensions.end()); std::set<std::string> requiredExtensions(deviceExtensions.begin(), deviceExtensions.end());
...@@ -837,16 +837,16 @@ private: ...@@ -837,16 +837,16 @@ private:
return requiredExtensions.empty(); return requiredExtensions.empty();
} }
QueueFamilyIndices findQueueFamilies(VkPhysicalDevice device) { QueueFamilyIndices findQueueFamilies(VkPhysicalDevice dev) {
QueueFamilyIndices indices; QueueFamilyIndices indices;
indices.hasGraphicsFamily = false; indices.hasGraphicsFamily = false;
indices.hasPresentFamily = false; indices.hasPresentFamily = false;
uint32_t queueFamilyCount = 0; uint32_t queueFamilyCount = 0;
vkGetPhysicalDeviceQueueFamilyProperties(device, &queueFamilyCount, nullptr); vkGetPhysicalDeviceQueueFamilyProperties(dev, &queueFamilyCount, nullptr);
std::vector<VkQueueFamilyProperties> queueFamilies(queueFamilyCount); std::vector<VkQueueFamilyProperties> queueFamilies(queueFamilyCount);
vkGetPhysicalDeviceQueueFamilyProperties(device, &queueFamilyCount, queueFamilies.data()); vkGetPhysicalDeviceQueueFamilyProperties(dev, &queueFamilyCount, queueFamilies.data());
int i = 0; int i = 0;
for (const auto& queueFamily : queueFamilies) { for (const auto& queueFamily : queueFamilies) {
...@@ -856,7 +856,7 @@ private: ...@@ -856,7 +856,7 @@ private:
} }
VkBool32 presentSupport = false; VkBool32 presentSupport = false;
vkGetPhysicalDeviceSurfaceSupportKHR(device, i, surface, &presentSupport); vkGetPhysicalDeviceSurfaceSupportKHR(dev, i, surface, &presentSupport);
if (queueFamily.queueCount > 0 && presentSupport) { if (queueFamily.queueCount > 0 && presentSupport) {
indices.presentFamily = i; indices.presentFamily = i;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
executable( executable(
multiarch + '-true', multiarch + '-true',
'true.c', 'true.c',
include_directories : project_include_dirs,
install : true, install : true,
install_dir : pkglibexecdir, install_dir : pkglibexecdir,
# Deliberately no RPATH/RUNPATH here: it's unnecessary because this # Deliberately no RPATH/RUNPATH here: it's unnecessary because this
...@@ -46,6 +47,7 @@ executable( ...@@ -46,6 +47,7 @@ executable(
multiarch + '-inspect-library', multiarch + '-inspect-library',
'inspect-library.c', 'inspect-library.c',
dependencies : [libdl], dependencies : [libdl],
include_directories : project_include_dirs,
install : true, install : true,
install_dir : pkglibexecdir, install_dir : pkglibexecdir,
# Deliberately no RPATH/RUNPATH here: we want to determine whether # Deliberately no RPATH/RUNPATH here: we want to determine whether
...@@ -56,6 +58,7 @@ executable( ...@@ -56,6 +58,7 @@ executable(
multiarch + '-check-vulkan', multiarch + '-check-vulkan',
'check-vulkan.cpp', 'check-vulkan.cpp',
dependencies : [vulkan, xcb], dependencies : [vulkan, xcb],
include_directories : project_include_dirs,
install : true, install : true,
install_dir : join_paths( install_dir : join_paths(
get_option('libexecdir'), get_option('libexecdir'),
......
...@@ -21,9 +21,15 @@ ...@@ -21,9 +21,15 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
project('steam-runtime-tools', 'c', project(
version : '0.20191024.0', 'steam-runtime-tools', 'c',
default_options: ['cpp_std=c++11']) version : '0.20191024.0',
default_options: [
'c_std=c99',
'cpp_std=c++11',
'warning_level=2',
],
)
add_languages('cpp') add_languages('cpp')
api_major = '0' api_major = '0'
...@@ -49,31 +55,24 @@ endif ...@@ -49,31 +55,24 @@ endif
glslang_validator = find_program('glslangValidator', required : true) glslang_validator = find_program('glslangValidator', required : true)
warning_cflags = [ warning_flags = [
'-Wall', '-Wall',
'-Wextra', '-Wextra',
'-Warray-bounds', '-Warray-bounds',
'-Wcast-align', '-Wcast-align',
'-Wdeclaration-after-statement',
'-Wdouble-promotion', '-Wdouble-promotion',
'-Wduplicated-branches', '-Wduplicated-branches',
'-Wduplicated-cond', '-Wduplicated-cond',
'-Wformat-nonliteral', '-Wformat-nonliteral',
'-Wformat-security', '-Wformat-security',
'-Wformat=2', '-Wformat=2',
'-Wimplicit-function-declaration',
'-Winit-self', '-Winit-self',
'-Winline',
'-Wjump-misses-init',
'-Wlogical-op', '-Wlogical-op',
'-Wmissing-declarations', '-Wmissing-declarations',
'-Wmissing-format-attribute', '-Wmissing-format-attribute',
'-Wmissing-include-dirs', '-Wmissing-include-dirs',
'-Wmissing-noreturn', '-Wmissing-noreturn',
'-Wmissing-prototypes',
'-Wnested-externs',
'-Wnull-dereference', '-Wnull-dereference',
'-Wold-style-definition',
'-Wpacked', '-Wpacked',
'-Wpointer-arith', '-Wpointer-arith',
'-Wredundant-decls', '-Wredundant-decls',
...@@ -81,27 +80,46 @@ warning_cflags = [ ...@@ -81,27 +80,46 @@ warning_cflags = [
'-Wreturn-type', '-Wreturn-type',
'-Wshadow', '-Wshadow',
'-Wstrict-aliasing', '-Wstrict-aliasing',
'-Wstrict-prototypes',
'-Wswitch-default', '-Wswitch-default',
'-Wswitch-enum', '-Wswitch-enum',
'-Wundef', '-Wundef',
'-Wunused-but-set-variable', '-Wunused-but-set-variable',
'-Wwrite-strings', '-Wwrite-strings',
] ]
no_warning_cflags = [ warning_cflags = warning_flags + [
'declaration-after-statement', '-Wimplicit-function-declaration',
'-Wjump-misses-init',
'-Wmissing-prototypes',
'-Wnested-externs',
'-Wold-style-definition',
'-Wstrict-prototypes',
]
warning_cxxflags = warning_flags + [
]
no_warning_flags = [
'inline',
'missing-field-initializers', 'missing-field-initializers',
'pedantic',
'sign-compare', 'sign-compare',
'unused-local-typedefs', 'unused-local-typedefs',
'unused-parameter', 'unused-parameter',
] ]
no_warning_cflags = no_warning_flags + [
'declaration-after-statement',
]
no_warning_cxxflags = no_warning_flags + [
]
c_compiler = meson.get_compiler('c') c_compiler = meson.get_compiler('c')
cpp_compiler = meson.get_compiler('cpp')
supported_warning_cflags = c_compiler.get_supported_arguments(warning_cflags) supported_warning_cflags = c_compiler.get_supported_arguments(warning_cflags)
add_project_arguments(supported_warning_cflags, language : 'c') add_project_arguments(supported_warning_cflags, language : 'c')
supported_warning_cxxflags = cpp_compiler.get_supported_arguments(warning_cxxflags)
add_project_arguments(supported_warning_cxxflags, language : 'cpp')
add_project_arguments( add_project_link_arguments(
c_compiler.get_supported_arguments( c_compiler.get_supported_link_arguments(
'-Wl,-z,origin', '-Wl,-z,origin',
# Generate RPATH in preference to RUNPATH, even if RUNPATH is the # Generate RPATH in preference to RUNPATH, even if RUNPATH is the
# linker's default. We want RPATH here, because it's used recursively # linker's default. We want RPATH here, because it's used recursively
...@@ -121,18 +139,31 @@ foreach flag : no_warning_cflags ...@@ -121,18 +139,31 @@ foreach flag : no_warning_cflags
add_project_arguments(supported_no_warning_cflags, language : 'c') add_project_arguments(supported_no_warning_cflags, language : 'c')
endforeach endforeach
foreach flag : no_warning_cxxflags
supported_no_warning_cxxflags = cpp_compiler.get_supported_arguments([
'-Wno-error=' + flag,
'-Wno-' + flag,
])
add_project_arguments(supported_no_warning_cxxflags, language : 'cpp')
endforeach
conf_data = configuration_data() conf_data = configuration_data()
conf_data.set('_GNU_SOURCE', '1')
conf_data.set_quoted('VERSION', meson.project_version()) conf_data.set_quoted('VERSION', meson.project_version())
configure_file( configure_file(
output : 'config.h', output : '_steam-runtime-tools-config.h',
configuration : conf_data, configuration : conf_data,
) )
add_project_arguments(['-std=c99'], language : 'c') add_project_arguments(
add_project_arguments(['-D_GNU_SOURCE'], language : 'c') ['-include', '_steam-runtime-tools-config.h'],
add_project_arguments(['-include', 'config.h'], language : 'c') language : 'c',
add_project_arguments(['-include', 'config.h'], language : 'cpp') )
add_project_arguments(
['-include', '_steam-runtime-tools-config.h'],
language : 'cpp',
)
glib = dependency( glib = dependency(
'glib-2.0', 'glib-2.0',
......
...@@ -65,6 +65,7 @@ install_subdir('sysroots', install_dir : tests_dir) ...@@ -65,6 +65,7 @@ install_subdir('sysroots', install_dir : tests_dir)
executable( executable(
'mock-true', 'mock-true',
join_paths('..', 'helpers', 'true.c'), join_paths('..', 'helpers', 'true.c'),
include_directories : project_include_dirs,
install : get_option('installed_tests'), install : get_option('installed_tests'),
install_dir : tests_dir, install_dir : tests_dir,
) )
...@@ -77,6 +78,7 @@ foreach test_name : tests ...@@ -77,6 +78,7 @@ foreach test_name : tests
'-D_SRT_MULTIARCH="' + multiarch + '"', '-D_SRT_MULTIARCH="' + multiarch + '"',
], ],
dependencies : [glib, gobject, libsteamrt_dep, json_glib], dependencies : [glib, gobject, libsteamrt_dep, json_glib],
include_directories : project_include_dirs,
install : get_option('installed_tests'), install : get_option('installed_tests'),
install_dir : tests_dir, install_dir : tests_dir,
) )
...@@ -146,6 +148,7 @@ executable( ...@@ -146,6 +148,7 @@ executable(
executable( executable(
'mock-good-wflinfo', 'mock-good-wflinfo',
'mock-good-wflinfo.c', 'mock-good-wflinfo.c',
include_directories : project_include_dirs,
install: true, install: true,
install_dir: tests_dir install_dir: tests_dir
) )
...@@ -153,6 +156,7 @@ executable( ...@@ -153,6 +156,7 @@ executable(
executable( executable(
'mock-hanging-wflinfo', 'mock-hanging-wflinfo',
'mock-hanging-wflinfo.c', 'mock-hanging-wflinfo.c',
include_directories : project_include_dirs,
install: true, install: true,
install_dir: tests_dir install_dir: tests_dir
) )
...@@ -160,6 +164,7 @@ executable( ...@@ -160,6 +164,7 @@ executable(
executable( executable(
'mock-bad-wflinfo', 'mock-bad-wflinfo',
'mock-bad-wflinfo.c', 'mock-bad-wflinfo.c',
include_directories : project_include_dirs,
install: true, install: true,
install_dir: tests_dir install_dir: tests_dir
) )
...@@ -167,6 +172,7 @@ executable( ...@@ -167,6 +172,7 @@ executable(
executable( executable(
'mock-software-wflinfo', 'mock-software-wflinfo',
'mock-software-wflinfo.c', 'mock-software-wflinfo.c',
include_directories : project_include_dirs,
install: true, install: true,
install_dir: tests_dir install_dir: tests_dir
) )
...@@ -174,6 +180,7 @@ executable( ...@@ -174,6 +180,7 @@ executable(
executable( executable(
'mock-good-vulkaninfo', 'mock-good-vulkaninfo',
'mock-good-vulkaninfo.c', 'mock-good-vulkaninfo.c',
include_directories : project_include_dirs,
install: true, install: true,
install_dir: tests_dir install_dir: tests_dir
) )
...@@ -181,6 +188,7 @@ executable( ...@@ -181,6 +188,7 @@ executable(
executable( executable(
'mock-bad-vulkaninfo', 'mock-bad-vulkaninfo',
'mock-bad-vulkaninfo.c', 'mock-bad-vulkaninfo.c',
include_directories : project_include_dirs,
install: true, install: true,
install_dir: tests_dir install_dir: tests_dir
) )
...@@ -188,6 +196,7 @@ executable( ...@@ -188,6 +196,7 @@ executable(
executable( executable(
'mock-good-check-vulkan', 'mock-good-check-vulkan',
join_paths('..', 'helpers', 'true.c'), join_paths('..', 'helpers', 'true.c'),
include_directories : project_include_dirs,
install: true, install: true,
install_dir: tests_dir install_dir: tests_dir
) )
...@@ -195,6 +204,7 @@ executable( ...@@ -195,6 +204,7 @@ executable(
executable( executable(
'mock-bad-check-vulkan', 'mock-bad-check-vulkan',
'mock-bad-check-vulkan.c', 'mock-bad-check-vulkan.c',
include_directories : project_include_dirs,
install: true, install: true,
install_dir: tests_dir install_dir: tests_dir
) )
...@@ -202,6 +212,7 @@ executable( ...@@ -202,6 +212,7 @@ executable(
executable( executable(
'mock-mixed-vulkaninfo', 'mock-mixed-vulkaninfo',
'mock-good-vulkaninfo.c', 'mock-good-vulkaninfo.c',
include_directories : project_include_dirs,
install: true, install: true,
install_dir: tests_dir install_dir: tests_dir
) )
...@@ -209,6 +220,7 @@ executable( ...@@ -209,6 +220,7 @@ executable(
executable( executable(
'mock-mixed-check-vulkan', 'mock-mixed-check-vulkan',
'mock-bad-check-vulkan.c', 'mock-bad-check-vulkan.c',
include_directories : project_include_dirs,
install: true, install: true,
install_dir: tests_dir install_dir: tests_dir
) )
......