Skip to content

Commit 2b5363e

Browse files
Mixficsolwuxianrong
andauthored
Force CMake to run with the policy behavior of version 3.5 to avoid cases where a higher version of CMake does not compile
Co-authored-by: wuxianrong <[email protected]>
1 parent 6dbb59f commit 2b5363e

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

.github/workflows/pika.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ jobs:
4747

4848
- name: Cleanup
4949
run: |
50-
rm -rf ./deps
5150
rm -rf ./buildtrees
5251
5352
- uses: actions/upload-artifact@v4
@@ -194,7 +193,6 @@ jobs:
194193
195194
- name: Cleanup
196195
run: |
197-
rm -rf ./deps
198196
rm -rf ./buildtrees
199197
200198
- name: Test
@@ -258,8 +256,7 @@ jobs:
258256
run: |
259257
cp deps/lib/libz.1.dylib .
260258
cp deps/lib/libz.1.dylib tests/integration/
261-
rm -rf ./deps
262-
rm -rf ./buildtree
259+
rm -rf ./buildtrees
263260
264261
- name: Unit Test
265262
working-directory: ${{ github.workspace }}

CMakeLists.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ ExternalProject_Add(gtest
150150
LOG_INSTALL
151151
1
152152
CMAKE_ARGS
153+
# Force CMake to run with the policy behavior of version 3.5 to avoid cases where a higher version of CMake does not compile
154+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
153155
-DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
154156
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE}
155157
BUILD_ALWAYS
@@ -191,6 +193,8 @@ ExternalProject_Add(gflags
191193
BUILD_ALWAYS
192194
1
193195
CMAKE_ARGS
196+
# Force CMake to run with the policy behavior of version 3.5 to avoid cases where a higher version of CMake does not compile
197+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
194198
-DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
195199
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE}
196200
-DGFLAGS_NAMESPACE=gflags
@@ -265,6 +269,8 @@ ExternalProject_Add(glog
265269
BUILD_ALWAYS
266270
1
267271
CMAKE_ARGS
272+
# Force CMake to run with the policy behavior of version 3.5 to avoid cases where a higher version of CMake does not compile
273+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
268274
-DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
269275
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE}
270276
-DWITH_GFLAGS=ON
@@ -306,6 +312,8 @@ ExternalProject_Add(snappy
306312
LOG_INSTALL
307313
1
308314
CMAKE_ARGS
315+
# Force CMake to run with the policy behavior of version 3.5 to avoid cases where a higher version of CMake does not compile
316+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
309317
-DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
310318
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE}
311319
-DSNAPPY_BUILD_TESTS=OFF
@@ -344,6 +352,8 @@ ExternalProject_Add(zstd
344352
SOURCE_SUBDIR
345353
build/cmake
346354
CMAKE_ARGS
355+
# Force CMake to run with the policy behavior of version 3.5 to avoid cases where a higher version of CMake does not compile
356+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
347357
-DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
348358
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE}
349359
-DBUILD_TESTING=OFF
@@ -380,6 +390,8 @@ ExternalProject_Add(fmt
380390
LOG_INSTALL
381391
1
382392
CMAKE_ARGS
393+
# Force CMake to run with the policy behavior of version 3.5 to avoid cases where a higher version of CMake does not compile
394+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
383395
-DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
384396
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE}
385397
BUILD_ALWAYS
@@ -421,6 +433,8 @@ ExternalProject_Add(lz4
421433
SOURCE_SUBDIR
422434
build/cmake
423435
CMAKE_ARGS
436+
# Force CMake to run with the policy behavior of version 3.5 to avoid cases where a higher version of CMake does not compile
437+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
424438
-DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
425439
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE}
426440
-DBUILD_TESTING=OFF
@@ -457,6 +471,8 @@ ExternalProject_Add(zlib
457471
LOG_INSTALL
458472
1
459473
CMAKE_ARGS
474+
# Force CMake to run with the policy behavior of version 3.5 to avoid cases where a higher version of CMake does not compile
475+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
460476
-DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
461477
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE}
462478
-DZLIB_USE_STATIC_LIBS=ON
@@ -488,6 +504,8 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
488504
LOG_INSTALL
489505
1
490506
CMAKE_ARGS
507+
# Force CMake to run with the policy behavior of version 3.5 to avoid cases where a higher version of CMake does not compile
508+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
491509
-DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
492510
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE}
493511
-DGPERFTOOLS_BUILD_STATIC=ON
@@ -556,6 +574,8 @@ ExternalProject_Add(protobuf
556574
SOURCE_SUBDIR
557575
cmake
558576
CMAKE_ARGS
577+
# Force CMake to run with the policy behavior of version 3.5 to avoid cases where a higher version of CMake does not compile
578+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
559579
-DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
560580
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE}
561581
-DBUILD_SHARED_LIBS=FALSE
@@ -605,6 +625,8 @@ ExternalProject_Add(rocksdb
605625
BUILD_ALWAYS
606626
1
607627
CMAKE_ARGS
628+
# Force CMake to run with the policy behavior of version 3.5 to avoid cases where a higher version of CMake does not compile
629+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
608630
-DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
609631
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
610632
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE}
@@ -646,6 +668,8 @@ ExternalProject_Add(rediscache
646668
SOURCE_SUBDIR
647669
""
648670
CMAKE_ARGS
671+
# Force CMake to run with the policy behavior of version 3.5 to avoid cases where a higher version of CMake does not compile
672+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
649673
-DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
650674
-DCMAKE_INSTALL_INCLUDEDIR=${INSTALL_INCLUDEDIR}
651675
-DCMAKE_INSTALL_LIBDIR=${INSTALL_LIBDIR}

0 commit comments

Comments
 (0)