DownloadFile.cmake 325 B

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