mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 20:00:51 -05:00
Merge topic 'cmake-gui-cc-cxx-env'
c3bd5a6a2c cmake-gui: Unset empty CC,CXX on global generator change
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6151
This commit is contained in:
+6
-3
@@ -1751,17 +1751,20 @@ void cmake::SetGlobalGenerator(std::unique_ptr<cmGlobalGenerator> gg)
|
||||
}
|
||||
if (this->GlobalGenerator) {
|
||||
// restore the original environment variables CXX and CC
|
||||
// Restore CC
|
||||
std::string env = "CC=";
|
||||
if (!this->CCEnvironment.empty()) {
|
||||
env += this->CCEnvironment;
|
||||
cmSystemTools::PutEnv(env);
|
||||
} else {
|
||||
cmSystemTools::UnPutEnv(env);
|
||||
}
|
||||
cmSystemTools::PutEnv(env);
|
||||
env = "CXX=";
|
||||
if (!this->CXXEnvironment.empty()) {
|
||||
env += this->CXXEnvironment;
|
||||
cmSystemTools::PutEnv(env);
|
||||
} else {
|
||||
cmSystemTools::UnPutEnv(env);
|
||||
}
|
||||
cmSystemTools::PutEnv(env);
|
||||
}
|
||||
|
||||
// set the new
|
||||
|
||||
Reference in New Issue
Block a user