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:
21
cpp/datastructs/templates/CMakeLists.txt
Normal file
21
cpp/datastructs/templates/CMakeLists.txt
Normal 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)
|
||||
@@ -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})
|
||||
|
||||
@@ -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
|
||||
@@ -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})
|
||||
|
||||
@@ -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
|
||||
@@ -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})
|
||||
|
||||
@@ -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
|
||||
@@ -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})
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user