cmake_minimum_required(VERSION 3.15)
-project(template)
+project(priority_queue)
set(CMAKE_C_STANDARD 11)
file(GLOB_RECURSE SRC
src/*.c
- template-test/*.c
+ priority_queue-test/*.c
)
-add_executable(template-test ${SRC})
-target_include_directories(template-test
+add_executable(priority_queue-test ${SRC})
+target_include_directories(priority_queue-test
PUBLIC src
- PUBLIC template-test
+ PUBLIC priority_queue-test
)
-target_link_libraries(template-test PRIVATE check)
+target_link_libraries(priority_queue-test PRIVATE check)
+++ /dev/null
-#!/bin/bash
-
-function error()
-{
- echo "provide a name"
- exit 1
-}
-
-function init()
-{
- echo "renaming template file & lines to $1"
- upper=$(echo $1 | tr '[:lower:]' '[:upper:]')
- under=$(echo $1 | tr '-' '_')
- dashes=$(echo $1 | tr '_' '-')
-
- mv src/template.h src/$under.h
- mv src/template.c src/$under.c
- find . -type f -name '*.[c|h]' -exec sed -i "s/template/$under/g" {} +
- sed -i "s/template/$under/g" CMakeLists.txt
- echo "build" > .gitignore
-
- # clearing README
- echo "# $dashes" > README.md
-}
-
-# do we have a name parameter?
-[ $# -eq 1 ] && init $1 || error
-rm -- "$0"
-
-# clearing up source control
-git rm src/template.c src/template.h $0
-git add src/ README.md .gitignore CMakeLists.txt
-
-git commit -m "replaced template strings with $1"
-git push
-