summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-21 11:26:28 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-07-21 11:26:41 (GMT)
commit19a0b5c54427101df656c39bfe9f76fc32c6d221 (patch)
treec688faa3195baa8f5933ff5165ed8f5465230cf1 /Source
parentdae9fd0d28bd5dea8021bb8bb6808fab940d8fa2 (diff)
parent5da2c7116577dd6407e6093992021cfd972ce08e (diff)
downloadCMake-19a0b5c54427101df656c39bfe9f76fc32c6d221.zip
CMake-19a0b5c54427101df656c39bfe9f76fc32c6d221.tar.gz
CMake-19a0b5c54427101df656c39bfe9f76fc32c6d221.tar.bz2
Merge topic 'ghs-crash' into release-3.18
5da2c71165 GHS: Fix crash when GHS_NO_SOURCE_GROUP_FILE property is not defined Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5033
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGhsMultiTargetGenerator.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 358d65a..97580d6 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -550,8 +550,9 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj)
*/
for (auto& sg : groupFilesList) {
std::ostream* fout;
- bool useProjectFile = cmIsOn(*this->GeneratorTarget->GetProperty(
- "GHS_NO_SOURCE_GROUP_FILE")) ||
+ cmProp noSourceGroupFile =
+ this->GeneratorTarget->GetProperty("GHS_NO_SOURCE_GROUP_FILE");
+ bool useProjectFile = (noSourceGroupFile && cmIsOn(*noSourceGroupFile)) ||
cmIsOn(this->Makefile->GetDefinition("CMAKE_GHS_NO_SOURCE_GROUP_FILE"));
if (useProjectFile || sg.empty()) {
fout = &fout_proj;