Add cmake project files for cpp/ directory and all relevant subdirecctories

+ Add Makefiles generated by CMake JIC make is preferred
+ Update cmake version, header comments, and project descriptions
This commit is contained in:
2021-04-27 23:42:12 -04:00
parent d4f6fb9d41
commit 8817a594be
39 changed files with 264 additions and 302 deletions

View File

@@ -0,0 +1,29 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: A root project for practicing C++ data structure implementations ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
#
cmake_minimum_required(VERSION 3.15)
project (
#[[NAME]] DataStructures
VERSION 1.0
DESCRIPTION "A project for practicing various data structures in C++"
LANGUAGES CXX
)
add_subdirectory(binarysearchtree)
add_subdirectory(circledoublelist)
add_subdirectory(circlesinglelist)
add_subdirectory(doublelist)
add_subdirectory(maxheap)
add_subdirectory(queuelist)
add_subdirectory(singlelist)
add_subdirectory(stacklist)
add_subdirectory(vector)
# Add subdirectory for examples of templated data stuctures
add_subdirectory(templates)

View File

@@ -1,14 +1,13 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: A basic CMakeLists configuration to test BST implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## CMakeLists.txt
#
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.2)
# Define the project name
project(BinarySearchTree)
# Define source files

View File

@@ -1,14 +1,12 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: An example of a circular doubly linked list implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## CMakeLists.txt
#
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(CircleDouble)

View File

@@ -1,23 +0,0 @@
CXX=g++
CXXFLAGS=-g -Wall
###############################################################################
# Driver
###############################################################################
driver: driver.cpp circledoublelist.o
${CXX} ${CXXFLAGS} driver.cpp circledoublelist.o -o driver
###############################################################################
# CircleDoubleList
###############################################################################
circledoublelist.o: circledoublelist.cpp circledoublelist.h
${CXX} ${CXXFLAGS} -c circledoublelist.cpp -o circledoublelist.o
###############################################################################
# Clean
###############################################################################
clean:
rm -f *.o driver

View File

@@ -1,14 +1,12 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: An example of a circular singly linked list implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## CMakeLists.txt
#
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(CircleSingle)

View File

@@ -1,23 +0,0 @@
CXX=g++
CXXFLAGS=-g -Wall
###############################################################################
# Driver
###############################################################################
driver: driver.cpp circlesinglelist.o
${CXX} ${CXXFLAGS} driver.cpp circlesinglelist.o -o driver
###############################################################################
# CircleSingleList
###############################################################################
circlesinglelist.o: circlesinglelist.cpp circlesinglelist.h
${CXX} ${CXXFLAGS} -c circlesinglelist.cpp -o circlesinglelist.o
###############################################################################
# Clean
###############################################################################
clean:
rm -f *.o driver

View File

@@ -1,14 +1,12 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: An example of a doubly linked list implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## CMakeLists.txt
#
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(DoubleList)

View File

@@ -1,23 +0,0 @@
CXX=g++
CXXFLAGS=-g -Wall
###############################################################################
# Driver
###############################################################################
driver: driver.cpp doublelist.o
${CXX} ${CXXFLAGS} driver.cpp doublelist.o -o driver
###############################################################################
# DoubleList
###############################################################################
doublelist.o: doublelist.cpp doublelist.h
${CXX} ${CXXFLAGS} -c doublelist.cpp -o doublelist.o
###############################################################################
# Clean
###############################################################################
clean:
rm -f *.o driver

View File

@@ -1,14 +1,12 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: An example of a max heap implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## CMakeLists.txt
#
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(MaxHeap)

View File

@@ -1,14 +1,12 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: An example of a queue implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## CMakeLists.txt
#
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(Queue)

View File

@@ -1,23 +0,0 @@
CXX=g++
CXXFLAGS=-g -Wall
###############################################################################
# Driver
###############################################################################
driver: driver.cpp queuelist.o
${CXX} ${CXXFLAGS} driver.cpp queuelist.o -o driver
###############################################################################
# QueueList
###############################################################################
queuelist.o: queuelist.cpp queuelist.h
${CXX} ${CXXFLAGS} -c queuelist.cpp -o queuelist.o
###############################################################################
# Clean
###############################################################################
clean:
rm -f *.o driver

View File

@@ -1,14 +1,12 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: An example of a singly linked list implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## CMakeLists.txt
#
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(SingleList)

View File

@@ -1,23 +0,0 @@
CXX=g++
CXXFLAGS=-g -Wall
###############################################################################
# Driver
###############################################################################
driver: driver.cpp singlelist.o
${CXX} ${CXXFLAGS} driver.cpp singlelist.o -o driver
###############################################################################
# SingleList
###############################################################################
singlelist.o: singlelist.cpp singlelist.h
${CXX} ${CXXFLAGS} -c singlelist.cpp -o singlelist.o
###############################################################################
# Clean
###############################################################################
clean:
rm -f *.o driver

View File

@@ -1,14 +1,13 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: An example of a stack implementation using linked lists ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## CMakeLists.txt
#
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(Stack)

View File

@@ -1,23 +0,0 @@
CXX=g++
CXXFLAGS=-g -Wall
###############################################################################
# Driver
###############################################################################
driver: driver.cpp stacklist.o
${CXX} ${CXXFLAGS} driver.cpp stacklist.o -o driver
###############################################################################
# StackList
###############################################################################
stacklist.o: stacklist.cpp stacklist.h
${CXX} ${CXXFLAGS} -c stacklist.cpp -o stacklist.o
###############################################################################
# Clean
###############################################################################
clean:
rm -f *.o driver

View File

@@ -0,0 +1,21 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: A root project for practicing templated data structures in C++ ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
#
cmake_minimum_required(VERSION 3.15)
project (
#[[NAME]] TemplatedStructures
VERSION 1.0
DESCRIPTION "A project for practicing templated data structures in C++"
LANGUAGES CXX
)
add_subdirectory(doublelist)
add_subdirectory(queuelist)
add_subdirectory(stacklist)
add_subdirectory(vector)

View File

@@ -1,18 +1,16 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: An example of a doubly linked list implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## CMakeLists.txt
#
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(DoubleList)
# Define source files
set(SRC driver.cpp)
# Build an executable
add_executable(DoubleListDriver ${SRC})
add_executable(TemplatedDoubleListDriver ${SRC})

View File

@@ -1,16 +0,0 @@
CXX=g++
CXXFLAGS=-g -Wall
###############################################################################
# Driver
###############################################################################
driver: driver.cpp
${CXX} ${CXXFLAGS} driver.cpp -o driver
###############################################################################
# Clean
###############################################################################
clean:
rm -f *.o driver

View File

@@ -1,18 +1,16 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: An example of a queue implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## CMakeLists.txt
#
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(Queue)
# Define source files
set(SRC driver.cpp)
# Build an executable
add_executable(QueueDriver ${SRC})
add_executable(TemplatedQueueDriver ${SRC})

View File

@@ -1,16 +0,0 @@
CXX=g++
CXXFLAGS=-g -Wall
###############################################################################
# Driver
###############################################################################
driver: driver.cpp
${CXX} ${CXXFLAGS} driver.cpp -o driver
###############################################################################
# Clean
###############################################################################
clean:
rm -f *.o driver

View File

@@ -1,18 +1,16 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: An example of a stack implementation using linked lists ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## CMakeLists.txt
#
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(Stack)
# Define source files
set(SRC driver.cpp)
# Build an executable
add_executable(StackDriver ${SRC})
add_executable(TemplatedStackDriver ${SRC})

View File

@@ -1,16 +0,0 @@
CXX=g++
CXXFLAGS=-g -Wall
###############################################################################
# Driver
###############################################################################
driver: driver.cpp
${CXX} ${CXXFLAGS} driver.cpp -o driver
###############################################################################
# Clean
###############################################################################
clean:
rm -f *.o driver

View File

@@ -1,18 +1,17 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: A basic CMakeLists configuration to test Vector implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## vector.cpp
#
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(VectorDriver)
# Define source files
set(SRC driver.cpp)
# Build an executable
add_executable(VectorDriver ${SRC})
add_executable(TemplatedVectorDriver ${SRC})

View File

@@ -1,16 +0,0 @@
CXX=g++
CXXFLAGS=-g -Wall
###############################################################################
# Driver
###############################################################################
driver: driver.cpp
${CXX} ${CXXFLAGS} driver.cpp -o driver
###############################################################################
# Clean
###############################################################################
clean:
rm -f *.o driver

View File

@@ -1,14 +1,13 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: A basic CMakeLists configuration to test Vector implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## vector.cpp
#
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(VectorDriver)

View File

@@ -1,23 +0,0 @@
CXX=g++
CXXFLAGS=-g -Wall
###############################################################################
# Driver
###############################################################################
driver: driver.cpp vector.o
${CXX} ${CXXFLAGS} driver.cpp vector.o -o driver
###############################################################################
# Vector
###############################################################################
vector.o: vector.cpp vector.h
${CXX} ${CXXFLAGS} -c vector.cpp -o vector.o
###############################################################################
# Clean
###############################################################################
clean:
rm -f *.o driver