From 938d9e60e069c20febb7181254b5c8cb38fea290 Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 25 Oct 2021 12:30:32 -0400 Subject: [PATCH] Use and recommend clang-format-11, not clang-format-10 Also: - Fix the numbered list formatting in the README.md - Describe the -DVULKAN_HPP_RUN_GENERATOR=ON option Fixes: #1116 --- .clang-format_10 => .clang-format_11 | 0 CMakeLists.txt | 6 +++--- README.md | 25 +++++++++++++++---------- 3 files changed, 18 insertions(+), 13 deletions(-) rename .clang-format_10 => .clang-format_11 (100%) diff --git a/.clang-format_10 b/.clang-format_11 similarity index 100% rename from .clang-format_10 rename to .clang-format_11 diff --git a/CMakeLists.txt b/CMakeLists.txt index e77198d..e8c81d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,12 +43,12 @@ if(CLANG_FORMAT_EXECUTABLE) else () message(STATUS " Found clang-format version <" ${clangFormatVersion} ">.") add_definitions(-DCLANG_FORMAT_EXECUTABLE="${CLANG_FORMAT_EXECUTABLE}") - if (clangFormatVersion VERSION_LESS 10.0.0) + if (clangFormatVersion VERSION_LESS 11.0.0) message(STATUS " Using .clang-format version 7." ) file(READ ".clang-format_7" clangFormat) else () - message(STATUS " Using .clang-format version 10." ) - file(READ ".clang-format_10" clangFormat) + message(STATUS " Using .clang-format version 11." ) + file(READ ".clang-format_11" clangFormat) endif () file(WRITE ".clang-format" ${clangFormat}) endif() diff --git a/README.md b/README.md index 54261d7..41c562a 100644 --- a/README.md +++ b/README.md @@ -22,17 +22,22 @@ Vulkan-Hpp requires a C++11 capable compiler to compile. The following compilers To build the local samples and tests you'll have to clone this repository and run CMake to generate the required build files -0.) Ensure that you have CMake and git installed and accessible from a shell. Ensure that you have installed the Vulkan SDK. Optionally install clang-format >= 10.0 to get a nicely formatted Vulkan-Hpp header. -1.) Open a shell which provides git and clone the repository with: -```git clone --recurse-submodules https://github.com/KhronosGroup/Vulkan-Hpp.git``` -2.) Change the current directory to the newly created Vulkan-Hpp directory. -3.) Create a new folder named ```build``` and change the current directory to the newly created folder. -4.) Create a build environment with CMake -```cmake -D DSAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP=ON -DSAMPLES_BUILD=ON -DTESTS_BUILD_WITH_LOCAL_VULKAN_HPP=ON -DTESTS_BUILD=ON -G "" ..``` -For a full list of generators execute ```cmake -G```. -5.) Either open the generated project with an IDE, e.g. Visual Studio or launch the build process with ```cmake --build .```. +0. Install dependencies. + * Ensure that you have CMake and git installed and accessible from a shell. + * Ensure that you have installed the Vulkan SDK. + * Optionally install clang-format >= 11.0 to get a nicely formatted Vulkan-Hpp header. +1. Open a shell which provides git and clone the repository with: + ```git clone --recurse-submodules https://github.com/KhronosGroup/Vulkan-Hpp.git``` +2. Change the current directory to the newly created Vulkan-Hpp directory. +3. Create a new folder named ```build``` and change the current directory to the newly created folder. +4. Create a build environment with CMake + ```cmake -D DSAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP=ON -DSAMPLES_BUILD=ON -DTESTS_BUILD_WITH_LOCAL_VULKAN_HPP=ON -DTESTS_BUILD=ON -G "" ..``` + For a full list of generators execute ```cmake -G```. + * To rebuild `vulkan.hpp` from the `vk.xml` XML registry file, add the + `-DVULKAN_HPP_RUN_GENERATOR=ON` option to the CMake command line. +5. Either open the generated project with an IDE, e.g. Visual Studio or launch the build process with ```cmake --build .```. -optional) To update the Vulkan-Hpp and its submodules execute ```git pull --recurse-submodules```. +Optional: To update the Vulkan-Hpp and its submodules execute ```git pull --recurse-submodules```. ### Optional Features