Skip to content

Conversation

@BassedWarrior
Copy link
Owner

  • feat(build): fail if main.cpp is missing.
  • test(build): correct integration test
  • docs(readme): specify importance of src/main.cpp

Implement a check before looking for any .cpp files to ensure that a
main.cpp file is present. Hence making sure also that at least a single
.cpp file is present, and also making sure that the project follows
filestructure convention.

Before even attempting to look for any `.cpp` file, ensure that the
`src/main.cpp` file is present. This with the aim of enforcing standards
and conventions when it comes to file structure.
According to the new behaviour, rather than looking for the error to be
that no `.cpp` files were found, simply look for the error to be that
there is no `src/main.cpp` file present. Which is what the new
implementation does. Which also ensures that at least a single `.cpp`
file is present.
The requirement that a `src/main.cpp` file be present in order for
`cppargo` to even attempt to look for any other `.cpp` files, and
subsequently call `g++` to compile the project was added to the
`README.md` file in order to document the enforcement of this file
structure standard, product of this latest refactoring.
@BassedWarrior BassedWarrior added this to the Release v0.3.0 milestone Jul 30, 2025
@BassedWarrior BassedWarrior added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 30, 2025
@BassedWarrior BassedWarrior linked an issue Jul 30, 2025 that may be closed by this pull request
@BassedWarrior BassedWarrior self-assigned this Jul 30, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Cppargo Jul 30, 2025
@BassedWarrior BassedWarrior merged commit a263c4d into main Jul 30, 2025
@BassedWarrior BassedWarrior deleted the 24-require-srcmaincpp-for-building branch July 30, 2025 20:53
@github-project-automation github-project-automation bot moved this from Backlog to Done in Cppargo Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Require src/main.cpp for building.

2 participants