Skip to content

Commit f1fea74

Browse files
mstorsjosunshaoce
andauthored
Bump the minimum CMake version to match current LLVM (#120)
* Bump the minimum CMake version to match current LLVM CMake 4.0 removed compatibility with CMake versions below 3.5. Therefore, it errors out on projects with a cmake_minimum_required() less than 3.5. (Since the last versions of CMake before 4.0, it already has been warning that compatibility with versions below 3.10 is deprecated.) Thus - this fixes building with CMake 4.0. * Fix CI errors - update gtest version - clang-format MICmdBase.cpp --------- Co-authored-by: Shao-Ce SUN <sunshaoce@outlook.com>
1 parent 2340ff2 commit f1fea74

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.4.3)
1+
cmake_minimum_required(VERSION 3.20.0)
22

33
if(POLICY CMP0077)
44
cmake_policy(SET CMP0077 NEW)

src/MICmdBase.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ bool CMICmdBase::HandleSBErrorWithSuccess(
249249
//--
250250
bool CMICmdBase::HandleSBErrorWithFailure(
251251
const lldb::SBError &error, const std::function<void()> &errorHandler) {
252-
return HandleSBError(
253-
error, [] { return MIstatus::success; }, errorHandler);
252+
return HandleSBError(error, [] { return MIstatus::success; }, errorHandler);
254253
}
255254

256255
//++
@@ -262,7 +261,7 @@ bool CMICmdBase::HandleSBErrorWithFailure(
262261
//--
263262
MIuint CMICmdBase::GetGUID() {
264263
MIuint64 vptr = reinterpret_cast<MIuint64>(this);
265-
MIuint id = (vptr)&0xFFFFFFFF;
264+
MIuint id = (vptr) & 0xFFFFFFFF;
266265
id ^= (vptr >> 32) & 0xFFFFFFFF;
267266

268267
return id;

test/unittests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
cmake_minimum_required(VERSION 3.11)
1+
cmake_minimum_required(VERSION 3.13)
22

33
include(FetchContent)
44
FetchContent_Declare(gtest
55
QUIET
6-
URL https://github.com/google/googletest/archive/refs/tags/release-1.11.0.zip
6+
URL https://github.com/google/googletest/releases/download/v1.16.0/googletest-1.16.0.tar.gz
77
)
88

99
# Prevent overriding the parent project's linker settings, for Windows.

0 commit comments

Comments
 (0)