From 5c2e1593bdc9b090a89111b5ddb21e11a9ca342c Mon Sep 17 00:00:00 2001 From: jakeg00dwin Date: Wed, 20 Mar 2024 12:35:13 -0700 Subject: [PATCH] setup to use regex for adding module to test's cmake file. --- otto.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/otto.sh b/otto.sh index 0a7a4a5..5442d0d 100755 --- a/otto.sh +++ b/otto.sh @@ -31,7 +31,10 @@ add_module_to_cmakes () { local basename="$1" echo "add_subdirectory(${basename})" >> ./src/CMakeLists.txt - echo "add_subdirectory(${basename})" >> ./tests/CMakeLists.txt + + # Tests cmake file needs to be edited in place. + sed "s/# TEST_DIRS.*$/# TEST_DIRS\radd_subdirectory(${basename})\r/g" ./tests/CMakeLists.txt > ./tests/CMakeLists.txt + sed "s/# TEST_LINKS.*$/# TEST_LINKS\r${basename}/g" ./tests/CMakeLists.txt > ./tests/CMakeLists.txt } remove_module_from_cmakes () {