What is the procedure for accessing code in other subdirectories?

System

g++ on Linux Mint.

Sample project

My project has lots of files, but attention may be confined to the three below and their related CMakeLists.txt files:

  1. containers/Square.cpp
  2. equations/DEsolve.cpp
  3. branch/cli.cpp

The first two contain no dependencies outside their own subdirectory. The third has include statements for the first two.

Symptom of problem

Complication of branch/cli.cpp produces

fatal error: Square.h: No such file or directory

I assume I need proper instructions in the CMakeLists.txt files, but I am new to cmake and don’t know them. Explanation or pointer to appropriate place in docs would be much appreciated.

I could easily provide zip of project, if that is allowed.

I think the tutorial would be the place to start here. Feel free to ask follow up questions on Discourse.

Thanks, I find the docs intimating because of the jargon.

@betsy.mcphail Do we have a glossary of terms we can link their first usage to?