this code is not working currently(not deactivating the download step), if provided non empty string, it does treat it as the download command
set(FRESH_DOWNLOAD off CACHE BOOL "download a fresh copy of all dependencies")
include(ExternalProject)
if (NOT FRESH_DOWNLOAD)
# Define the variable to disable DOWNLOAD step
set(civ_DOWNLOAD DOWNLOAD_COMMAND "")
else()
# Define an empty variable.
# This actually can be omitted since absent variable is treated as empty.
set(civ_DOWNLOAD)
endif()
ExternalProject_Add(civ
SOURCE_DIR ${PROJECT_SOURCE_DIR}/test
BUILD_COMMAND ${MAKE_EXE}
BINARY_DIR "./bin"
INSTALL_COMMAND ""
GIT_REPOSITORY "https://github.com/test/test"
GIT_TAG "v1.0"
${civ_DOWNLOAD} # IMPORTANT: Do not use double quotes here.
CMAKE_ARGS
"-DTuberosumTools_DIR=${TUBEROSUMTOOLS_DIR}"
)
original question here