setup to use regex for adding module to test's cmake file.
This commit is contained in:
parent
599822b932
commit
5c2e1593bd
5
otto.sh
5
otto.sh
|
@ -31,7 +31,10 @@ add_module_to_cmakes () {
|
||||||
local basename="$1"
|
local basename="$1"
|
||||||
|
|
||||||
echo "add_subdirectory(${basename})" >> ./src/CMakeLists.txt
|
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 () {
|
remove_module_from_cmakes () {
|
||||||
|
|
Loading…
Reference in New Issue