Skip to content

project: Define variables indicating whether project is top level

Based on the discussion in #20310 (comment 924569), this MR will add two new variables that are set by project():

  • PROJECT_IS_TOP_LEVEL normal variable
  • <PROJECT-NAME>_IS_TOP_LEVEL cache variable

Their value reflects the boolean returned by cmMakefile#IsRootMakefile() at the time of calling the project() command.

Issue: #20310
Fixes: #21961 (closed)
Topic-rename: project-is-top-level

Edited by Brad King

Merge request reports