Skip to content

mrtfkcgl/BasicTemplateCPlusPlus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyProject

This project is a sample C++ project with Student and Teacher classes. The project is structured with CMake and tested using Google Test. The framework is designed to be modular and easy to manage.

Project Structure

├── build
├── CMakeLists.txt
├── include
│   ├── student
│   │   └── student.hpp
│   └── teacher
│       └── teacher.hpp
├── src
│   ├── CMakeLists.txt
│   ├── main.cpp
│   ├── student
│   │   ├── CMakeLists.txt
│   │   └── student.cpp
│   └── teacher
│       ├── CMakeLists.txt
│       └── teacher.cpp
└── test
    ├── CMakeLists.txt
    ├── studentTest
    │   ├── CMakeLists.txt
    │   └── test_student.cpp
    └── teacherTest
        ├── CMakeLists.txt
        └── test_teacher.cpp

Installation and Compilation

Requirements

  • CMake (version 3.14 or higher)
  • A C++ compiler (g++ or clang++)
  • Google Test (will be automatically downloaded using CMake FetchContent)

Steps

1.Create a directory named build in the project root and navigate into it.

$mkdir -p build && cd build

2.Generate the project build files with CMake:

$cmake ..

3.Compile the project:

$make 

Compiling Only Tests

1.Compile the tests:

$make studentTest teacherTest
  1. Run the tests:

    $ctest -V

Project Contents

Libraries

Student: Contains student/student.hpp and student/student.cpp files.
Teacher: Contains teacher/teacher.hpp and teacher/teacher.cpp files.

Tests

The tests are located in the test directory and are written using Google Test.

studentTest: Contains test/studentTest/test_student.cpp file.
teacherTest: Contains test/teacherTest/test_teacher.cpp file.

About

Basic C++ Template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published