Vulkan-Utility-Libraries/BUILD.md
Juan Ramos 280a68ef17 cmake: Use VUL_ prefix for cache variables
Allows build options specific to Vulkan-Utility-Libraries to be
easily grouped via cmake-gui.

This approach is also nicer for users who consume the library via
add_subdirectory or FetchContent since it more obvious what
settings are being ovverriden.

Remove UTILITY_LIBRARIES_CPP_STANDARD since we don't have a
reason to support multiple CPP standards.

Set testing to OFF by default to make consuming the library easier
for users and package managers.
2023-03-30 12:44:36 +02:00

1.4 KiB

Build Instructions

This document contains the instructions for building this repository on Linux, macOS and Windows.

  1. Requirements
  2. Building Overview
  3. CMake

Requirements

  1. CMake >= 3.17.2
  2. C++ >= c++17 compiler. See platform-specific sections below for supported compiler versions.
  3. Python >= 3.8

Building Overview

The following will be enough for most people, for more detailed instructions, see below.

git clone git@github.com:KhronosGroup/Vulkan-Profiles.git
cd Vulkan-Profiles

cmake -S . -B build/ -D CMAKE_BUILD_TYPE=Debug -D UPDATE_DEPS=ON
cmake --build build --config Debug
cmake -S . -B build/ -D VUL_WERROR=ON -D VUL_TESTS=ON -D CMAKE_BUILD_TYPE=Debug -D UPDATE_DEPS=ON

Unit Tests

cd build/
ctest -C Debug --parallel 8 --output-on-failure

CMake

Warnings as errors off by default!

By default VUL_WERROR is OFF

The idiom for open source projects is to NOT enable warnings as errors.

System package managers, and language package managers have to build on multiple different platforms and compilers.

By defaulting to ON we cause issues for package managers since there is no standard way to disable warnings until CMake 3.24

Add -D VUL_WERROR=ON to your workflow. Or use the dev preset shown below which will also enabling warnings as errors.