- uses: actions/setup-python@v2
with:
python-version: '3.7'
+ - uses: lukka/get-cmake@latest
+ with:
+ cmakeVersion: 3.17.2
- name: Generate build files
- run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}} -D${{matrix.static_build}} -DBUILD_TESTS=On -DUPDATE_DEPS=ON -DTEST_USE_ADDRESS_SANITIZER=ON
+ run: cmake -S. -B build -DCMAKE_BUILD_TYPE=${{matrix.config}} -D${{matrix.static_build}} -DBUILD_TESTS=ON -DUPDATE_DEPS=ON -DTEST_USE_ADDRESS_SANITIZER=ON -G "Ninja"
env:
# Specify the minimum version of macOS on which the target binaries are to be deployed.
# https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html
MACOSX_DEPLOYMENT_TARGET: 10.12
- name: Build the loader
- run: make -C build
+ run: cmake --build build
- name: Run regression tests
working-directory: ./build
steps:
- uses: actions/checkout@v3
-
- name: Get depot tools
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git depot_tools
- name: Build the loader
run: ninja -C out/${{matrix.config}}
-
- test-cmake-minimum:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: lukka/get-cmake@latest
- with:
- cmakeVersion: 3.10.2
-
- - name: Install Dependencies
- run: sudo apt update && sudo apt install --yes --no-install-recommends libwayland-dev libxrandr-dev
-
- - name: CMake Version
- run: cmake --version
-
- - name: Create build directory
- run: mkdir build/
-
- - name: Get Dependencies
- working-directory: ./build
- run: python ../scripts/update_deps.py
-
- - name: Configure Vulkan-Loader
- working-directory: ./build
- run: cmake -C helper.cmake -D BUILD_TESTS=OFF -G "Ninja" ../
-
- - name: Build the loader
- run: cmake --build build/
- [2017 & 2019](https://www.visualstudio.com/vs/older-downloads/)
- The Community Edition of each of the above versions is sufficient, as
well as any more capable edition.
-- [CMake 3.10.2](https://cmake.org/files/v3.10/cmake-3.10.2-win64-x64.zip) is recommended.
+- [CMake 3.17.2](https://cmake.org/files/v3.17/cmake-3.17.2-win64-x64.zip) is recommended.
- Use the installer option to add CMake to the system PATH
- Git Client Support
- [Git for Windows](http://git-scm.com/download/win) is a popular solution
although earlier versions may work. It should be straightforward to adapt this
repository to other Linux distributions.
-[CMake 3.10.2](https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz) is recommended.
+[CMake 3.17.2](https://cmake.org/files/v3.17/cmake-3.17.2-Linux-x86_64.tar.gz) is recommended.
#### Required Package List
### MacOS build
-[CMake 3.10.2](https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz) is recommended.
-
-#### CMake Generators
-
-This repository uses CMake to generate build or project files that are then
-used to build the repository. The CMake generators explicitly supported in
-this repository are:
-
-- Unix Makefiles
-- Xcode
+[CMake 3.17.2](https://cmake.org/files/v3.17/cmake-3.17.2-Darwin-x86_64.tar.gz) is recommended.
#### Building with the Unix Makefiles Generator
# See the License for the specific language governing permissions and
# limitations under the License.
# ~~~
-cmake_minimum_required(VERSION 3.10.2)
+cmake_minimum_required(VERSION 3.17.2)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
project(Vulkan-Loader)
"System-wide search directory. If not set or empty, CMAKE_INSTALL_FULL_SYSCONFDIR and /etc are used.")
endif()
-# Because we use CMake 3.10.2, we can't use the policy which would disable adding /W3 by default. In the interim, replace the flags
-# When this project is updated to 3.15 and above, use the following line.
-# cmake_policy(SET CMP0092 NEW)
-string(REGEX REPLACE "/W3" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
-string(REGEX REPLACE "/W3" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-
# For MSVC/Windows, replace /GR with an empty string, this prevents warnings of /GR being overriden by /GR-
# Newer CMake versions (3.20) have better solutions for this through policy - using the old
# way while waiting for when updating can occur