[CMake] ExternalData in sources

Simon Rit simon.rit at creatis.insa-lyon.fr
Tue Jun 11 02:42:37 EDT 2013


Hi,
I have a git source repository which contains a number of examples.
Each example consists of a few text files and, sometimes, large binary
files. I would like to remove those binary files from the git
repository and to download them from MIDAS instead using the
ExternalData mechanism:
http://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/ExternalData.cmake

My intention was to add link to the binary files in the source
directory and to add them in the .gitignore files. I tried to set
these two variables :
  set(ExternalData_SOURCE_ROOT ${CMAKE_SOURCE_DIR}/examples)
  set(ExternalData_BINARY_ROOT ${CMAKE_SOURCE_DIR}/examples)
but cmake prevents me from doing that with the message:
  ExternalData_LINK_CONTENT cannot be used in-source

Could someone explain me why? Is there a workaround for what I want to
do? Thanks in advance,
Simon


More information about the CMake mailing list