help passing passing empty parameter ("") indirectly to `ExternalProject_Add`

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

Passing empty strings is tough. For simplicity, I would recommend using a command of something like true (for Unix) or a similar command on Windows. It has a similar effect, but you don’t have to fight argument quoting rules.

Thanks, that is my currently solution, except i need the code to be crossplatform, so instead of "true" i am trying to use something like "cd .", but i am really new to cmake, and not sure how to write it cause that way is not executed exactly like that, my guess is that cmake adds arguments. I am also new to bash and windows cmd so, no idea what alternative could use.

EDIT: i am using dir right now, not the best aproach though.

It might be easier to make the GIT_ information conditional. That way, ExternalProject won’t know how to downoad it anyways.

You mean like the repo name? Never think in that, i will try it, thanks again.