It is ambiguous if it is allowed for the root project() call.
From https://cmake.org/cmake/help/latest/command/project.html#usage
The top-level CMakeLists.txt file for a project must contain a literal, direct call to the project() command
The question would be does a macro meet these requirements. Or would a macro loaded via include
violate this rule.