(@@TODO: A tldr of your project. Something like:)
MathUtils is a cross platform @@TODO()-licensed C++14 application & library for generating the dot product of two std::vector
s.
(@@TODO A longer description of your awesome project!)
MathUtils is a simple library and application to show basic CMake functionality.
This project uses the Pitchfork project layout.
- CMake 3.14 or newer
- A C++14 capable compiler
- An internet connection (some dependencies are fetched at build time via CMake's
FetchContent
)
Load the required modules:
module load cmake gcc
Follow the steps for on a normal machine
Note: Whenever BUILD_TYPE
is used, replace with Debug
, Release
, RelWithDebInfo
, or MinSizeRel
.
git clone [email protected]:7thfleet/CubeGame.git
cd CubeGame
cmake -B build
- The default build type is Debug. To change it for single-configuration generators (normally everything but Xcode and Visual Studio), append the following to the
cmake -S . -B build
command:
-DCMAKE_BUILD_TYPE=BUILD_TYPE
To disable building the tests, append-DBUILD_TESTING=OFF
to thecmake -S . -B build
command.
cmake --build build
- For multi-configuration generators(normally just Xcode and Visual Studio), the build type can be selected by appending the following to the
cmake --build build
command:--config BUILD_TYPE
For single-configuration generators(normally everything but Xcode and Visual Studio):
cmake --build build -t test
For multi-configuration generators(normally only Xcode and Visual Studio):
cmake --build build -t RUN_TESTS
You may need to select the build type(for multi-configuration generators only). Append --config BUILD_TYPE
. BUILD_TYPE
should be the same as used in step #4.
Note that the test target does not rebuild anything. As a result, you may want to run cmake --build build
before running the tests after making changes.
After completing the Building & Testing steps, the binaries are located in build/bin/
, and the library and archive files in build/lib/
. Examples and documentation are provided below. Note if you are using a multi-configuration generator, they are located in build/bin/BUILD_TYPE/
, and build/lib/BUILD_TYPE
.
MathUtils <file1.txt> <file2.txt>
file1.txt
and file2.txt
must be ASCII text files representing the vectors to compute the dot product of. Each line must have one integer, and the files must be the same length(and therefore have the same number of integers). Two sample files are provided in data/
. For example,
MathUtils data/one.txt data/two.txt
Will output [1, 3, -5] DOT [4, -2, -1] = 3
The code in this repository, as well as the file CoolLogo.png
are licensed under @@TODO. Note that any distributed binaries or build trees may require a different license, as the two libraries fetched at build time ({fmt} and doctest) are both MIT-licensed. See LICENSE.
(@@TODO: The above is a bit more verbose than you need to be, since you'll likely be using a different license, like MIT).
- Add your name here!
- CMake Base Project: Jared White