Skip to content

Commit 55451e2

Browse files
committed
fix build error
1 parent ad76244 commit 55451e2

File tree

5 files changed

+114
-4
lines changed

5 files changed

+114
-4
lines changed

.github/workflows/cmake.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ jobs:
5252
run: |
5353
cmake -B build -G Ninja \
5454
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
55-
-DCMAKE_C_COMPILER=clang \
56-
-DCMAKE_CXX_COMPILER=clang++ \
55+
-DCLICE_DEV_ENV=ON \
5756
-DCLICE_ENABLE_TEST=ON \
5857
-DCLICE_CI_ENVIRONMENT=ON
5958

CMakeLists.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
cmake_minimum_required(VERSION 3.20)
1+
cmake_minimum_required(VERSION 3.30)
2+
3+
if(CLICE_DEV_ENV)
4+
set(CMAKE_C_COMPILER "clang")
5+
set(CMAKE_CXX_COMPILER "clang++")
6+
7+
# it's important to set clang to use lld here, otherwise the compiler detection
8+
# may fail on some conda prebuilt clang.
9+
set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "Forced LLD" FORCE)
10+
set(CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "Forced LLD" FORCE)
11+
set(CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "Forced LLD" FORCE)
12+
endif()
13+
214
project(CLICE_PROJECT LANGUAGES C CXX)
315

416
set(CMAKE_CXX_STANDARD 23)

cmake/package.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ endif()
7676

7777
# install dependencies
7878
include(FetchContent)
79+
set(FETCHCONTENT_UPDATES_DISCONNECTED ON)
7980

8081
if(WIN32)
8182
set(NULL_DEVICE NUL)
@@ -88,6 +89,8 @@ FetchContent_Declare(
8889
libuv
8990
GIT_REPOSITORY https://github.com/libuv/libuv.git
9091
GIT_TAG v1.x
92+
GIT_SHALLOW TRUE
93+
GIT_PROGRESS TRUE
9194
)
9295

9396
if(NOT WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
@@ -102,19 +105,25 @@ FetchContent_Declare(
102105
spdlog
103106
GIT_REPOSITORY https://github.com/gabime/spdlog.git
104107
GIT_TAG v1.15.3
108+
GIT_SHALLOW TRUE
109+
GIT_PROGRESS TRUE
105110
)
106111

107112
# tomlplusplus
108113
FetchContent_Declare(
109114
tomlplusplus
110115
GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
116+
GIT_SHALLOW TRUE
117+
GIT_PROGRESS TRUE
111118
)
112119

113120
# croaring
114121
FetchContent_Declare(
115122
croaring
116123
GIT_REPOSITORY https://github.com/RoaringBitmap/CRoaring.git
117124
GIT_TAG v4.4.2
125+
GIT_SHALLOW TRUE
126+
GIT_PROGRESS TRUE
118127
)
119128
set(ENABLE_ROARING_TESTS OFF CACHE INTERNAL "" FORCE)
120129
set(ENABLE_ROARING_MICROBENCHMARKS OFF CACHE INTERNAL "" FORCE)
@@ -124,6 +133,8 @@ FetchContent_Declare(
124133
flatbuffers
125134
GIT_REPOSITORY https://github.com/google/flatbuffers.git
126135
GIT_TAG v25.9.23
136+
GIT_SHALLOW TRUE
137+
GIT_PROGRESS TRUE
127138
)
128139
set(FLATBUFFERS_BUILD_GRPC OFF CACHE BOOL "" FORCE)
129140
set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "" FORCE)
@@ -134,6 +145,8 @@ FetchContent_Declare(
134145
cpptrace
135146
GIT_REPOSITORY https://github.com/jeremy-rifkin/cpptrace.git
136147
GIT_TAG v1.0.4
148+
GIT_SHALLOW TRUE
149+
GIT_PROGRESS TRUE
137150
)
138151
set(CPPTRACE_DISABLE_CXX_20_MODULES ON CACHE BOOL "" FORCE)
139152

pixi.lock

Lines changed: 85 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ channels = ["conda-forge"]
1111
platforms = ["win-64", "linux-64", "osx-arm64"]
1212

1313
[dependencies]
14-
cmake = ">=3.28"
14+
cmake = ">=3.30"
1515
ninja = "*"
1616
clang = "==20.1.8"
1717
clangxx = "==20.1.8"
1818
lld = "==20.1.8"
19+
compiler-rt = "==20.1.8"
1920

2021
[target.linux-64.dependencies]
2122
# sysroot_linux-64 = "==2.17"

0 commit comments

Comments
 (0)