aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake/vcpkg_replace_string.cmake
diff options
context:
space:
mode:
authornicole mazzuca <mazzucan@outlook.com>2020-12-01 13:37:26 -0800
committerGitHub <noreply@github.com>2020-12-01 13:37:26 -0800
commit6b117c9c7e23b933045e0f898120ec837a3816f0 (patch)
tree67eab9ba2c6caca67d6f1423a5db5cbdbc44d40d /scripts/cmake/vcpkg_replace_string.cmake
parentf92bf6ee1ec327799c0b1b5efac2365fb7004237 (diff)
downloadvcpkg-6b117c9c7e23b933045e0f898120ec837a3816f0.tar.gz
vcpkg-6b117c9c7e23b933045e0f898120ec837a3816f0.zip
[vcpkg docs] Check for documentation generation in CI (#14614)
* [vcpkg docs] Change how documenting port functions works Instead of using `##`, use comment blocks for documentation. Also, add some minor docs and change RST -> MD so we actually get docs generated. * add CI stuff * regenerate docs * fix vcpkg_find_acquire_program to not use _execute_process
Diffstat (limited to 'scripts/cmake/vcpkg_replace_string.cmake')
-rw-r--r--scripts/cmake/vcpkg_replace_string.cmake20
1 files changed, 11 insertions, 9 deletions
diff --git a/scripts/cmake/vcpkg_replace_string.cmake b/scripts/cmake/vcpkg_replace_string.cmake
index 3eb18d0bf..d24b8677e 100644
--- a/scripts/cmake/vcpkg_replace_string.cmake
+++ b/scripts/cmake/vcpkg_replace_string.cmake
@@ -1,12 +1,14 @@
-#.rst:
-# .. command:: vcpkg_replace_string
-#
-# Replace a string in a file.
-#
-# ::
-# vcpkg_replace_string(filename match_string replace_string)
-#
-#
+#[===[.md:
+# vcpkg_replace_string
+
+Replace a string in a file.
+
+```cmake
+vcpkg_replace_string(filename match_string replace_string)
+```
+
+#]===]
+
function(vcpkg_replace_string filename match_string replace_string)
file(READ ${filename} _contents)
string(REPLACE "${match_string}" "${replace_string}" _contents "${_contents}")