Fix: Initial CMake run does not have PATH set

If certain tools are not in the systems base PATH, as can be the case
on macOS where Ninja might be located in /usr/local/bin, the initial run
of cmake for a new/clean project would fail as the PATH (and the rest
of the environment variables) would not be set for a freshly initialized
CMakeBuildConfiguration.

This change fixes that by calling
updateAndEmitConfigureEnvironmentChanged at the end of the build system
initialization.

Change-Id: Ib2ebe4da60a6284548eabed124240212178c67e1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-09-01 08:52:12 +02:00
parent 1567d24980
commit ef11da3629

View File

@@ -1367,6 +1367,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
m_buildSystem->setInitialCMakeArguments(cmd.splitArguments());
m_buildSystem->setCMakeBuildType(buildType);
updateAndEmitConfigureEnvironmentChanged();
});
}