DownloadFile.cmake 294 B

12345678910111213
  1. include(FetchContent)
  2. # The file hash depends on the line endings used by git
  3. file(MD5 ${CMAKE_CURRENT_LIST_DIR}/dummyFile.txt md5_hash)
  4. FetchContent_Declare(
  5. t1
  6. URL ${CMAKE_CURRENT_LIST_DIR}/dummyFile.txt
  7. URL_HASH MD5=${md5_hash}
  8. DOWNLOAD_NO_EXTRACT YES
  9. )
  10. FetchContent_Populate(t1)