configure_file.cmake 342 B

12345678910111213141516171819
  1. # MIT License
  2. # Copyright (c) 2023 SineStriker
  3. # Description:
  4. # Command that executes `configure_file`.
  5. # Usage:
  6. # cmake
  7. # -D input=<file>
  8. # -D output=<file>
  9. # -D force=TRUE/FALSE
  10. # [-D args=<args...>]
  11. # -P configure_file.cmake
  12. if(force AND EXISTS ${_output})
  13. file(REMOVE ${_output})
  14. endif()
  15. configure_file(${input} ${output} ${args})