PROPAGATE_TOP_LEVEL_INCLUDES_TO_TRY_COMPILE — CMake 4.3.0 Documentation

# PROPAGATE_TOP_LEVEL_INCLUDES_TO_TRY_COMPILE

Added in version 3.30.

When this global property is set to true, the `CMAKE_PROJECT_TOP_LEVEL_INCLUDES` variable is propagated into `try_compile()` calls that use the whole-project signature. Calls to the source file signature are not affected by this property. `PROPAGATE_TOP_LEVEL_INCLUDES_TO_TRY_COMPILE` is unset by default.

For dependency providers that want to be enabled in whole-project `try_compile()` calls, set this global property to true just before or after registering the provider. Note that all files listed in `CMAKE_PROJECT_TOP_LEVEL_INCLUDES` will need to be able to handle being included in such `try_compile()` calls, and it is the user's responsibility to ensure this.