Clean up CMakeLists in all C++ examples

+ Rename output executables to match directory structure
+ Remove libraries for small examples
+ Supress -Wreturn-type warnings for singleton that is intentionally not copyable
This commit is contained in:
2022-03-31 16:01:08 -04:00
parent 573fc4e1e8
commit a97dfbe34b
98 changed files with 695 additions and 598 deletions

View File

@@ -1,11 +1,11 @@
###############################################################################
## 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 ##
##############################################################################
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 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 (

View File

@@ -1,11 +1,11 @@
###############################################################################
## Author: Shaun Reed ##
## 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 ##
##############################################################################
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
## About: A basic CMakeLists configuration to test BST implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
################################################################################
cmake_minimum_required(VERSION 3.15)
project (
@@ -15,7 +15,7 @@ project (
LANGUAGES CXX
)
add_library(lib-bst "bst.cpp")
add_executable(test-bst "driver.cpp")
target_link_libraries(test-bst lib-bst)
add_executable(
data-bst driver.cpp
bst.cpp bst.h
)

View File

@@ -1,16 +1,21 @@
###############################################################################
## Author: Shaun Reed ##
## 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 ##
##############################################################################
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 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 ##
################################################################################
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(CircleDouble)
# Define source files
set(SRC driver.cpp circledoublelist.cpp)
# Build an executable
add_executable(CircleDoubleDriver ${SRC})
project (
#[[NAME]] CircleDoubleList
VERSION 1.0
DESCRIPTION "Project for testing circular doubly linked list implementation"
LANGUAGES CXX
)
add_executable(
data-circular-doubly-linked-list driver.cpp
circledoublelist.cpp circledoublelist.h
)

View File

@@ -1,16 +1,21 @@
###############################################################################
## Author: Shaun Reed ##
## 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 ##
##############################################################################
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 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 ##
################################################################################
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(CircleSingle)
# Define source files
set(SRC driver.cpp circlesinglelist.cpp)
# Build an executable
add_executable(CircleSingleDriver ${SRC})
project (
#[[NAME]] CircleSingleList
VERSION 1.0
DESCRIPTION "Project for testing circular singly linked list implementation"
LANGUAGES CXX
)
add_executable(
data-circular-singly-linked-list driver.cpp
circlesinglelist.cpp circlesinglelist.h
)

View File

@@ -1,16 +1,21 @@
###############################################################################
## Author: Shaun Reed ##
## 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 ##
##############################################################################
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
## About: An example of a doubly linked list implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
################################################################################
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(DoubleList)
# Define source files
set(SRC driver.cpp doublelist.cpp)
# Build an executable
add_executable(DoubleListDriver ${SRC})
project (
#[[NAME]] DoubleList
VERSION 1.0
DESCRIPTION "A project for testing a doubly linked list implementation"
LANGUAGES CXX
)
add_executable(
data-doubly-linked-list driver.cpp
doublelist.cpp doublelist.h
)

View File

@@ -1,16 +1,21 @@
###############################################################################
## Author: Shaun Reed ##
## 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 ##
##############################################################################
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
## About: An example of a max heap implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
################################################################################
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(MaxHeap)
# Define source files
set(SRC driver.cpp maxheap.cpp)
# Build an executable
add_executable(HeapDriver ${SRC})
project (
#[[NAME]] MaxHeap
VERSION 1.0
DESCRIPTION "A project for testing a max heap implementation"
LANGUAGES CXX
)
add_executable(
data-max-heap driver.cpp
maxheap.cpp maxheap.h
)

View File

@@ -1,16 +1,21 @@
###############################################################################
## Author: Shaun Reed ##
## 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 ##
##############################################################################
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
## About: An example of a queue implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
################################################################################
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(Queue)
# Define source files
set(SRC driver.cpp queuelist.cpp)
# Build an executable
add_executable(QueueDriver ${SRC})
project (
#[[NAME]] Queue
VERSION 1.0
DESCRIPTION "Project for testing queue implementation"
LANGUAGES CXX
)
add_executable(
data-queue driver.cpp
queuelist.cpp queuelist.h
)

View File

@@ -1,16 +1,21 @@
###############################################################################
## Author: Shaun Reed ##
## 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 ##
##############################################################################
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
## About: An example of a singly linked list implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
################################################################################
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(SingleList)
# Define source files
set(SRC driver.cpp singlelist.cpp)
# Build an executable
add_executable(SingleListDriver ${SRC})
project (
#[[NAME]] SingleList
VERSION 1.0
DESCRIPTION "A project for testing a singly linked list implementation"
LANGUAGES CXX
)
add_executable(
data-singly-linked-list driver.cpp
singlelist.cpp singlelist.h
)

View File

@@ -1,17 +1,21 @@
###############################################################################
## Author: Shaun Reed ##
## 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
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 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 ##
################################################################################
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(Stack)
# Define source files
set(SRC driver.cpp stacklist.cpp)
# Build an executable
add_executable(StackDriver ${SRC})
project (
#[[NAME]] Stack
VERSION 1.0
DESCRIPTION "A project for testing a Stack implementation"
LANGUAGES CXX
)
add_executable(
data-stack driver.cpp
stacklist.cpp stacklist.h
)

View File

@@ -1,11 +1,11 @@
###############################################################################
## 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 ##
##############################################################################
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 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 (

View File

@@ -1,16 +1,18 @@
###############################################################################
## Author: Shaun Reed ##
## 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 ##
##############################################################################
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
## About: An example of a templated doubly linked list implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
################################################################################
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(DoubleList)
# Define source files
set(SRC driver.cpp)
# Build an executable
add_executable(TemplatedDoubleListDriver ${SRC})
project (
#[[NAME]] TemplatedDoubleList
VERSION 1.0
DESCRIPTION "A project for practicing templated doubly linked list implementations"
LANGUAGES CXX
)
add_executable(data-templates-doubly-linked-list driver.cpp)

View File

@@ -1,16 +1,18 @@
###############################################################################
## Author: Shaun Reed ##
## 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 ##
##############################################################################
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
## About: An example of a templated queue implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
################################################################################
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(Queue)
# Define source files
set(SRC driver.cpp)
# Build an executable
add_executable(TemplatedQueueDriver ${SRC})
project (
#[[NAME]] TemplatedQueue
VERSION 1.0
DESCRIPTION "A project for practicing templated queue implementations"
LANGUAGES CXX
)
add_executable(data-templates-queue driver.cpp)

View File

@@ -1,16 +1,18 @@
###############################################################################
## Author: Shaun Reed ##
## 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 ##
##############################################################################
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
## About: An example of a templated stack implementation using linked lists ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
################################################################################
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(Stack)
# Define source files
set(SRC driver.cpp)
# Build an executable
add_executable(TemplatedStackDriver ${SRC})
project (
#[[NAME]] TemplatedStack
VERSION 1.0
DESCRIPTION "A project for practicing templated Stack implementations"
LANGUAGES CXX
)
add_executable(data-templates-stack driver.cpp)

View File

@@ -1,17 +1,18 @@
###############################################################################
## Author: Shaun Reed ##
## 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
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
## About: An example of a templated vector implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
################################################################################
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(VectorDriver)
# Define source files
set(SRC driver.cpp)
# Build an executable
add_executable(TemplatedVectorDriver ${SRC})
project (
#[[NAME]] TemplatedVector
VERSION 1.0
DESCRIPTION "A project for practicing templated Vector implementations"
LANGUAGES CXX
)
add_executable(data-templates-vectors driver.cpp)

View File

@@ -1,17 +1,21 @@
###############################################################################
## Author: Shaun Reed ##
## 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
#
################################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
## About: A basic CMakeLists configuration to test Vector implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
################################################################################
cmake_minimum_required(VERSION 3.15)
# Define the project name
project(VectorDriver)
# Define source files
set(SRC driver.cpp vector.cpp)
# Build an executable
add_executable(VectorDriver ${SRC})
project (
#[[NAME]] VectorDriver
VERSION 1.0
DESCRIPTION "A project for testing a basic Vector implementation"
LANGUAGES CXX
)
add_executable(
data-vectors driver.cpp
vector.cpp vector.h
)