Introduce cmake_policy CMP0128 NEW
This commit is contained in:
parent
0d86137317
commit
980e26da63
@ -1,6 +1,6 @@
|
|||||||
# CMakeList.txt
|
# CMakeList.txt
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2023 wolfSSL Inc.
|
# Copyright (C) 2006-2024 wolfSSL Inc.
|
||||||
#
|
#
|
||||||
# This file is part of wolfSSL. (formerly known as CyaSSL)
|
# This file is part of wolfSSL. (formerly known as CyaSSL)
|
||||||
#
|
#
|
||||||
@ -21,6 +21,12 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
|
if(${CMAKE_VERSION} VERSION_LESS "3.22")
|
||||||
|
message(STATUS "This project recommends using CMake version 3.22 or higher. You are using ${CMAKE_VERSION}.")
|
||||||
|
else()
|
||||||
|
cmake_policy(SET CMP0128 NEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||||
message(FATAL_ERROR "In-source builds are not allowed.\
|
message(FATAL_ERROR "In-source builds are not allowed.\
|
||||||
Run cmake from a separate directory from where CMakeLists.txt lives.\
|
Run cmake from a separate directory from where CMakeLists.txt lives.\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user