Adding or removing files in the projects
CGP projects are handled using CMake (or direct Makefile) configured to find reccusively any source file finishing by .cpp (starting from the root directory of the project and the library).
To add or remove a file in a CGP project:
-
\(\Rightarrow\) Simply add/remove the file using your file explorer of your system.
-
\(\Rightarrow\) Then run CMake again on the file CMakeLists.txt. At the next compilation, the new file will be taken into account.
If you are using an IDE: Do
not use the add/remove file from the software. The new file may not be consistently recognized at the compilation. Instead, follow these steps:
Process with Visual Studio on Windows with external CMake:
-
1. Close Visual Studio (not necessary, but safest sometimes)
-
2. Create/remove the files directly in your filesystem
-
3. Run CMake on your project
-
4. Open Visual Studio on the updated .sln (if closed previously)
-
-
The new files should appear on the Solution Explorer
Process with Visual Studio on Windows with embedded CMake
-
1. Create/remove the files directly in your filesystem
-
2. Click on "Project -> Delete Cache and Reconfigure"
-
-
The new files should appear on the Solution Explorer
Process with QtCreator
-
1. Create/remove the files directly in your filesystem
-
2. Select "Build -> Run CMake"
-
-
The new files should appear on the Project files