During the discussion about implementing CMAKE_PROJECT_TOP_LEVEL_INCLUDES (https://gitlab.kitware.com/cmake/cmake/-/issues/22619) there was some discussion on whether the includes should be read before or after the toolchain file, and it was decided that would be the latter.
Is it possible for a dependency provider, implemented via CMAKE_PROJECT_TOP_LEVEL_INCLUDES, to influence variables typically specified in a toolchain eg CMAKE_CXX_COMPILER?
For a concrete example, say the conan package integration downloads an sdk package that provides a toolchain file. That file won’t be ready until the package is downloaded so it can’t be provided to CMAKE_TOOLCHAIN_FILE (unless the depdendency provider can set this var?).
The workaround is to invoke conan separately but this is not ideal and having CMake orchestrate the entire process is a better developer experience.
Thanks!