[llvm] [CMake] Add root CMakeLists.txt to allow direct CMake execution from root (PR #152753)
Shaoce SUN via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 8 10:21:55 PDT 2025
https://github.com/sunshaoce updated https://github.com/llvm/llvm-project/pull/152753
>From a8fe9f385f88ed25c9ddb52ecae8225c9687c073 Mon Sep 17 00:00:00 2001
From: Shao-Ce SUN <sunshaoce at outlook.com>
Date: Sat, 9 Aug 2025 00:11:03 +0800
Subject: [PATCH 1/2] [CMake] Add root CMakeLists.txt to allow direct CMake
execution from root
---
CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000000000..b908b8a7082bd
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,4 @@
+cmake_minimum_required(VERSION 3.20.0)
+
+# Primary CMake config is the CMakeLists.txt file in the llvm directory
+add_subdirectory(llvm)
>From 1e0a38cf80fad84b646f0d9a0b7432e3539a09d0 Mon Sep 17 00:00:00 2001
From: Shao-Ce SUN <sunshaoce at outlook.com>
Date: Sat, 9 Aug 2025 01:21:41 +0800
Subject: [PATCH 2/2] add `project()` to suppress warning
---
CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b908b8a7082bd..600803e2e995c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,6 @@
cmake_minimum_required(VERSION 3.20.0)
+project(LLVM-PROJECT)
+
# Primary CMake config is the CMakeLists.txt file in the llvm directory
add_subdirectory(llvm)
More information about the llvm-commits
mailing list