(#16759) docs: clarify everything should use CMake 3.15 to match Conan 2.0

This commit is contained in:
Chris Mc
2023-04-01 02:45:37 -07:00
committed by GitHub
parent 655e1c2fa2
commit 3f27b6db0f
9 changed files with 11 additions and 9 deletions

View File

@@ -311,7 +311,9 @@ The CMake definition [CMAKE_VERBOSE_MAKEFILE](https://cmake.org/cmake/help/lates
#### **<a name="KB-H048">#KB-H048</a>: "CMAKE VERSION REQUIRED"**
The file test_package/CMakeLists.txt should require CMake 3.1 by default: [cmake_minimum_required(VERSION 3.1)](https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html). The CMake wrapper file can require CMake 2.8, because Conan recipe and the test package are totally separated. However, if [CMAKE_CXX_STANDARD](https://cmake.org/cmake/help/latest/variable/CMAKE_CXX_STANDARD.html) or [CXX_STANDARD](https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html#prop_tgt:CXX_STANDARD) is explicit, CMake 3.1 is mandatory.
> **Warning**: This is a legacy Conan 1.x details from the deprecated generators
The file test_package/CMakeLists.txt should require CMake 3.15 by default: [cmake_minimum_required(VERSION 3.15)](https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html). The CMake wrapper file can require CMake 2.8, because Conan recipe and the test package are totally separated. However, if [CMAKE_CXX_STANDARD](https://cmake.org/cmake/help/latest/variable/CMAKE_CXX_STANDARD.html) or [CXX_STANDARD](https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html#prop_tgt:CXX_STANDARD) is explicit, CMake 3.1 is mandatory.
#### **<a name="KB-H049">#KB-H049</a>: "CMAKE WINDOWS EXPORT ALL SYMBOLS"**

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES C) # if the project is pure C
# project(test_package LANGUAGES CXX) # if the project uses c++

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES C) # if the project is pure C
# project(test_package LANGUAGES CXX) # if the project uses c++

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.15)
project(test_package C) # if the project is pure C
# project(test_package CXX) # if the project uses c++

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.15)
project(test_package)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES C) # if the project is pure C
# project(test_package LANGUAGES CXX) # if the project uses c++

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES C) # if the project is pure C
project(test_package LANGUAGES CXX) # if the project uses c++

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.15)
project(test_package C) # if the project is pure C
project(test_package CXX) # if the project uses c++

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.15)
project(test_package C) # if the project is pure C
project(test_package CXX) # if the project uses c++