-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kaelan Hansson - Desktop
committed
Aug 24, 2022
1 parent
b124e25
commit 90813af
Showing
22 changed files
with
291 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
project(Class1) | ||
|
||
|
||
include(GNUInstallDirs) | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}) | ||
|
||
|
||
|
||
add_subdirectory(src) | ||
add_subdirectory(src2) | ||
add_subdirectory(src3) | ||
add_subdirectory(src4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
|
||
|
||
|
||
|
||
1. Compiling and Linking | ||
2. Creating Varaibles and Arrays, C++ symbology | ||
3. structs, functions, and classes | ||
4. Templates | ||
5. Control Flow (loops etc) | ||
6. ??? | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_executable( TheExecutable main.cpp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
mkdir ../build | ||
mkdir ../build/bin | ||
|
||
|
||
#Don't Use These, These are for intermediate steps | ||
clang++ -E main.cpp > main.ipp | ||
clang++ -S main.cpp | ||
|
||
#These are the usual routines for compiling | ||
clang++ -c main.cpp | ||
clang++ -o TheExecutable main.o | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Integrated Makefile for the MONACO software system. | ||
# Uses file "Makefile.arch" for system specific declarations | ||
# | ||
# Last modified April 28, 2004 | ||
|
||
SHELL = /bin/sh | ||
|
||
# Necessary directories | ||
# MONACOHOME should be an environment variable indicating the top | ||
# of the monaco distribution tree. | ||
BASEDIR=$(PWD) | ||
|
||
BINDIR = $(BASEDIR)/../buid/bin | ||
SRCDIR = $(BASEDIR) | ||
|
||
CC=clang | ||
CXX=clang++ | ||
|
||
|
||
|
||
PROGNAME = TheExecutable | ||
|
||
|
||
|
||
# Targets... | ||
|
||
default : TheExecutable | ||
|
||
TARGETS = main.cpp | ||
OBJS = $(TARGETS:.cpp=.o) | ||
# Make the monaco executable and all utilities | ||
#all : monaco oxford util | ||
|
||
#-lboost; | ||
|
||
%.o: %.cpp | ||
$(CXX) -c -o $@ $< | ||
|
||
|
||
TheExecutable : $(OBJS) | ||
$(CXX) -o $(PROGNAME) $(OBJS) -lm; | ||
rm $(SRCDIR)/*.o | ||
|
||
|
||
# Cleanup options | ||
|
||
# Remove object files from directories related to monaco executable | ||
clean : | ||
|
||
|
||
|
||
# Remove all object files, libraries and executables from entire directory tree | ||
# Basically resets to the original monaco distribution state | ||
distclean : clean | ||
cd $(BINDIR); /bin/rm -f * | ||
|
||
# DO NOT DELETE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
#include <iostream> | ||
|
||
|
||
|
||
int main() | ||
{ | ||
|
||
int TestNumber = 98765432; | ||
|
||
std::cout << "Hello, Oh Cruel World\n"; | ||
std::cout << "The Number is: " << TestNumber << std::endl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
add_executable( TheSecondExecutable main.cpp testfunction.cpp) | ||
|
||
target_include_directories(TheSecondExecutable INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}> ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
#include <iostream> | ||
#include "testfunction.hpp" | ||
|
||
|
||
int main() | ||
{ | ||
|
||
double TestNumber = 98.765432; | ||
|
||
std::cout << "Hello, Oh Cruel World\n"; | ||
std::cout << "The Number is: " << TestFunction(TestNumber) << std::endl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
|
||
|
||
#include "testfunction.hpp" | ||
|
||
|
||
double TestFunction(double a) | ||
{ | ||
return a * a; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef MPIC_TESTFUNCTION | ||
#define MPIC_TESTFUNCTION | ||
|
||
|
||
double TestFunction(double a); | ||
|
||
|
||
#endif /* MPIC_TESTFUNCTION */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
add_subdirectory(library) | ||
|
||
add_executable( TheThirdExecutable main.cpp ) | ||
|
||
target_link_libraries(TheThirdExecutable PUBLIC TheLibrary) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
add_library( TheLibrary testfunction.cpp) | ||
|
||
target_include_directories(TheLibrary INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}> ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
|
||
|
||
#include "testfunction.hpp" | ||
|
||
|
||
double TestFunction(double a) | ||
{ | ||
return a * a; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef MPIC_TESTFUNCTION | ||
#define MPIC_TESTFUNCTION | ||
|
||
|
||
|
||
double TestFunction(double a); | ||
|
||
|
||
#endif /* MPIC_TESTFUNCTION */ | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
#include <iostream> | ||
#include "testfunction.hpp" | ||
|
||
|
||
int main() | ||
{ | ||
|
||
double TestNumber = 98.765432; | ||
|
||
std::cout << "Hello, Oh Cruel World\n"; | ||
std::cout << "The Number is: " << TestFunction(TestNumber) << std::endl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
add_subdirectory(library) | ||
|
||
|
||
find_package(nlohmann_json QUIET) | ||
if(nlohmann_json_FOUND) | ||
message("json is found at ${Eigen3_DIR}") | ||
else() | ||
|
||
include(FetchContent) | ||
|
||
FetchContent_Declare( | ||
json | ||
GIT_REPOSITORY https://github.com/nlohmann/json.git | ||
GIT_TAG master | ||
GIT_SHALLOW TRUE | ||
GIT_PROGRESS TRUE) | ||
|
||
FetchContent_MakeAvailable(json) | ||
|
||
endif() | ||
|
||
|
||
|
||
add_custom_target( CopyFile ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_LIST_DIR}/input.json ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/input.json) | ||
|
||
|
||
add_executable( TheFouthExecutable main.cpp ) | ||
|
||
target_link_libraries(TheFouthExecutable PUBLIC TheSecondLibrary nlohmann_json::nlohmann_json) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"data": 1.234, | ||
"Energy Exchange": [ | ||
{ | ||
"Method": "VHS", | ||
"Species 1": "Xe", | ||
"Species 2": "Xe" | ||
}, | ||
{ | ||
"Angle Constant 1": -2.02, | ||
"Angle Constant 2": 0.0045, | ||
"Method": "YHCross", | ||
"Species 1": "Xe", | ||
"Species 2": "Xe+" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
add_library( TheSecondLibrary testfunction.cpp) | ||
|
||
target_include_directories(TheSecondLibrary INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}> ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
|
||
|
||
#include "testfunction.hpp" | ||
|
||
|
||
double TestFunction(double a) | ||
{ | ||
return a * a; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef MPIC_TESTFUNCTION | ||
#define MPIC_TESTFUNCTION | ||
|
||
|
||
double TestFunction(double a); | ||
|
||
|
||
|
||
|
||
#endif /* MPIC_TESTFUNCTION */ |
Oops, something went wrong.