ExternalProject_Add( luacov URL https://github.com/keplerproject/luacov/archive/v0.7.tar.gz DOWNLOAD_DIR ${EXTERNAL_PROJECT_DOWNLOAD_DIR} CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${MY_TOOLCHAIN_FILE} SOURCE_DIR ${EXTERNAL_PROJECT_SRC_DIR}/luacov BINARY_DIR ${EXTERNAL_PROJECT_BUILD_DIR}/luacov UPDATE_COMMAND "" PATCH_COMMAND "" )
-- downloading... src='https://github.com/keplerproject/luacov/archive/v0.7.tar.gz' dst='/home/build/my_build/external_projects/downloads/v0.7.tar.gz' timeout='none' CMake Error at /home/build/my_build/luacov-prefix/src/luacov-stamp/download-luacov.cmake:21 (message): error: downloading 'https://github.com/keplerproject/luacov/archive/v0.7.tar.gz' failed status_code: 1 status_string: "Unsupported protocol" log: Protocol "https" not supported or disabled in libcurl Closing connection -1
使用 ldd $(which cmake)
没有 libcurl.so.4=>/usr/lib/x86_64-linux-gnu/libcurl.so.4
解决方法一:
cmake编译默认是不加curl的,需要重装cmake
git clone -b v3.10.2 https://cmake.org/cmake.git cmake
cd cmake
./bootstrap --system-curl
make
sudo make install
或者
./configure --prefix=/software/cmake-3.10.2/ --parallel=${NPROC} -- \ -/DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_USE_OPENSSL:BOOL=ON
make -j ${NPROC}
make install
方法二:
#URL https://github.com/keplerproject/luacov/archive/v0.7.tar.gz
GIT_REPOSITORY https://github.com/keplerproject/luacov.git
或 DOWNLOAD_COMMAND wget https://github.com/keplerproject/luacov/archive/v0.7.tar.gz