cmake: Update minimum to 3.17.2
authorJuan Ramos <juan@lunarg.com>
Fri, 27 Jan 2023 16:48:34 +0000 (09:48 -0700)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Fri, 27 Jan 2023 18:54:47 +0000 (11:54 -0700)
Matches what VVL currently uses

.github/workflows/build.yml
BUILD.md
CMakeLists.txt

index f4d106132301ec86fca57fcde762f540d9a4392c..f8d25da2cb014212d72252806af5d452be09c3dc 100644 (file)
@@ -160,16 +160,19 @@ jobs:
             - 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
@@ -184,7 +187,6 @@ jobs:
 
         steps:
             - uses: actions/checkout@v3
-
             - name: Get depot tools
               run: |
                 git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git depot_tools
@@ -203,31 +205,3 @@ jobs:
 
             - 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/
index 5aaf23cdd0eaa17d5effa482f6e310d525b1374e..9fc12293b7785eaee3ad6e0f2c0165fb9955fc37 100644 (file)
--- a/BUILD.md
+++ b/BUILD.md
@@ -296,7 +296,7 @@ cmake ... -D CMAKE_CXX_COMPILER_LAUNCHER=/usr/bin/ccache -D CMAKE_C_COMPILER_LAU
     - [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
@@ -434,7 +434,7 @@ that the minimum officially supported C++11 compiler version is GCC 5.4.0,
 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
 
@@ -638,16 +638,7 @@ Clone the Vulkan-ValidationLayers repository:
 
 ### 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
 
index 9dea536631c1523b4764b39ec497869925b6249a..647d5d71bddb675c6c90e9f9e13d1c2752e17ad9 100644 (file)
@@ -14,7 +14,7 @@
 # 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)
@@ -157,12 +157,6 @@ if(UNIX)
             "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