setup to use regex for adding module to test's cmake file.

This commit is contained in:
jakeg00dwin 2024-03-20 12:35:13 -07:00
parent 599822b932
commit 5c2e1593bd
1 changed files with 4 additions and 1 deletions

View File

@ -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 () {