Chapter 7: Structuring Projects

September 16, 2018 ยท View on GitHub

  • 1. Code reuse with functions and macros
  • 2. Splitting CMake sources into modules
  • 3. Writing a function to test and set compiler flags
  • 4. Defining a function or macro with named arguments
  • 5. Redefining functions and macros
  • 6. Deprecating functions, macros, and variables
  • 7. Limiting scope with add_subdirectory
  • 8. Avoiding global variables using target_sources
  • 9. Organizing Fortran projects