Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake minimum version 3.10 #13760

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mesonbuild/cmake/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def update_cmake_compiler_state(self) -> None:
languages = list(self.compilers.keys())
lang_ids = [language_map.get(x, x.upper()) for x in languages]
cmake_content = dedent(f'''
cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 3.10)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we able to get away with the same "whatever the current version is" trick here too?

project(CompInfo {' '.join(lang_ids)})
''')

Expand Down
4 changes: 2 additions & 2 deletions test cases/cmake/1 basic/subprojects/cmMod/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod)
set (CMAKE_CXX_STANDARD 14)
Expand All @@ -12,7 +12,7 @@ target_compile_definitions(cmModLib++ PRIVATE MESON_MAGIC_FLAG=21)
target_compile_definitions(cmModLib++ INTERFACE MESON_MAGIC_FLAG=42)

# Test PCH support
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.16.0")
target_precompile_headers(cmModLib++ PRIVATE "cpp_pch.hpp")
endif()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod)
set (CMAKE_CXX_STANDARD 14)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod)
set (CMAKE_CXX_STANDARD 14)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod)
set (CMAKE_CXX_STANDARD 14)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod C CXX)
set (CMAKE_CXX_STANDARD 14)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod)
set (CMAKE_CXX_STANDARD 14)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod)
set (CMAKE_CXX_STANDARD 14)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod)
set(CMAKE_CXX_STANDARD 14)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmModule)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod NONE)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)

project(cmMod NONE)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmTest LANGUAGES C OBJC)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmTest)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod VERSION 1.2.3)
set(CMAKE_CXX_STANDARD 14)
Expand All @@ -12,7 +12,7 @@ target_compile_definitions(cmModLib++ PRIVATE MESON_MAGIC_FLAG=21)
target_compile_definitions(cmModLib++ INTERFACE MESON_MAGIC_FLAG=42)

# Test PCH support
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.16.0")
target_precompile_headers(cmModLib++ PRIVATE "cpp_pch.hpp")
endif()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})
project(cmModDummy)
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})
project(cmModBoth)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod)
set(CMAKE_CXX_STANDARD 14)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod)
set (CMAKE_CXX_STANDARD 14)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmMod)
set (CMAKE_CXX_STANDARD 14)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmlib)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

project(cmlib)

Expand Down
2 changes: 1 addition & 1 deletion test cases/unit/1 soname/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# soname to 1.2.3 but Autotools sets it to 1.

project(vertest C)
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION ${CMAKE_VERSION})

add_library(nover SHARED versioned.c)

Expand Down
Loading