File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
.github/docker_images/cmake_build_versions Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,21 @@ echo "Building CMake Version: ${CMAKE_VERSION:-unknown}"
99
1010NUM_CPU_THREADS=$( grep -c ^processor /proc/cpuinfo)
1111
12- # At the moment this works fine for all versions, in the future build logic can be modified to
13- # look at it ${CMAKE_VERSION}.
14- ./configure --prefix=/opt/cmake --system-curl --system-libarchive
12+ # CMake versions before 4.0 have compatibility issues with newer system curl libraries.
13+ # The curl headers define CURL_NETRC_* as long int values, but older CMake code expects
14+ # them to be CURL_NETRC_OPTION enum values, causing compilation errors.
15+ # For older versions, we use CMake's bundled curl instead of the system curl.
16+ CONFIGURE_OPTS=" --prefix=/opt/cmake --system-libarchive"
17+
18+ if [[ " ${CMAKE_VERSION} " =~ ^[0-3]\. ]]; then
19+ # CMake versions 3.x and earlier: use bundled curl to avoid compatibility issues
20+ echo " Using bundled curl for CMake ${CMAKE_VERSION} "
21+ else
22+ # CMake 4.0 and later: safe to use system curl
23+ echo " Using system curl for CMake ${CMAKE_VERSION} "
24+ CONFIGURE_OPTS=" ${CONFIGURE_OPTS} --system-curl"
25+ fi
26+
27+ ./configure ${CONFIGURE_OPTS}
1528make -j" ${NUM_CPU_THREADS} "
16- make install
29+ make install
You can’t perform that action at this time.
0 commit comments