Skip to content
Snippets Groups Projects
Commit 9856c480 authored by RAVAGLIA JORIS's avatar RAVAGLIA JORIS
Browse files

Updated Readme

parent 30067709
No related merge requests found
......@@ -5,15 +5,13 @@ This repo contains the correction of pratical works of the Programmation Avancé
## Compilation
We use CMake to configure and build the project.
As for now, there is a major constraint on how the project must be structured. See the following snippet from the `CMakeLists.txt` file for more details:
> **WARNING:** you must follow the following rules for the compilation to work as expected:
> - each "tp directory" (tp1, tp2, etc) must contain three sub-directories:
> - include: must contain the header files
> - src: must contain the implementation files with the extension ".cpp" or ".hpp"
> - apps: must contain one file per program entry point (main function)
> - source file names must "match" the name of the main file:
> - if a main function is declared in "apps/foo.cpp" then all related source files (all files used to build the program) must include "foo" in their name. For example:
> - "src/foo_university.cpp" will be linked with "apps/foo.cpp"
> - "src/university_foo.cpp" will be linked with "apps/foo.cpp"
> - "src/univerfoosity.cpp" will be linked with "apps/foo.cpp" (even if it seems dirty, but that is the developper's responsability)
> - "src/university.cpp" will **NOT** be linked with "apps/foo.cpp"
\ No newline at end of file
To compile this projet, you might use the following:
```bash
mkdir build
cd build
cmake -S ../ -B ./
cmake --build ./
```
Alternatively, you can use `cmake --build ./ -j8` to enable cmake to use 8 cores for parallel compilation (change 8 to whatever the number of cores you want to use).
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment