mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
cmLocalCommonGenerator: Save CMAKE_BUILD_TYPE on construction
Copy the value to our `ConfigName` member on construction to ensure it is available even to code paths that run before `Generate`. We once needed to delay this lookup until `Generate` because the local generators were at one time created before `Configure`. Now they are created at generate time which is late enough to expect `CMAKE_BUILD_TYPE` to be available. Without this, `cmGlobalUnixMakefileGenerator3::WriteConvenienceRules` causes use of `ConfigName` before it is populated which breaks use of source files that depend on the `$<CONFIG>` generator expression. Fixes: #16889
This commit is contained in:
@@ -33,7 +33,6 @@ public:
|
||||
protected:
|
||||
std::string WorkingDirectory;
|
||||
|
||||
void SetConfigName();
|
||||
std::string ConfigName;
|
||||
|
||||
friend class cmCommonTargetGenerator;
|
||||
|
||||
Reference in New Issue
Block a user