build: fix cmake version warnings

To fix some cmake dev warnings in recent cmake versions, move
cmake_minimum_required() to before project() and set the minimum
required cmake version to 3.5.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2023-08-26 02:31:31 +00:00
parent 37f4affe55
commit 2407923fc0
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 2 additions and 2 deletions

View File

@ -74,9 +74,9 @@ if(NOT CMAKE_CXX_COMPILER_LAUNCHER)
endif() endif()
endif() endif()
project(VBA-M C CXX) cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 2.8.12) project(VBA-M C CXX)
if(NOT CMAKE_PREFIX_PATH AND (NOT ("$ENV{CMAKE_PREFIX_PATH}" STREQUAL ""))) if(NOT CMAKE_PREFIX_PATH AND (NOT ("$ENV{CMAKE_PREFIX_PATH}" STREQUAL "")))
set(CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH}") set(CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH}")