diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CPack/cpack.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 507a10c..b6ff38b 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -350,16 +350,16 @@ int main(int argc, char const* const* argv) } if (parsed) { cpackGenerator = generators.NewGenerator(gen); - if (!cpackGenerator) { + if (cpackGenerator) { + cpackGenerator->SetTrace(trace); + cpackGenerator->SetTraceExpand(traceExpand); + } else { cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "Cannot initialize CPack generator: " << gen << std::endl); parsed = 0; } - cpackGenerator->SetTrace(trace); - cpackGenerator->SetTraceExpand(traceExpand); - if (parsed && !cpackGenerator->Initialize(gen, mf)) { cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "Cannot initialize the generator " << gen |