diff options
author | Tushar Maheshwari <tushar27192@gmail.com> | 2019-09-07 08:45:08 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2019-09-17 17:05:26 (GMT) |
commit | c9c1eb99fe011546b5d9390c7fbbeebfda491c65 (patch) | |
tree | a0c691e03d3629e680f09a72685d563c0b82444a /Source/CPack/cpack.cxx | |
parent | e6ddb57479a3620c712719c120a7337a84470d21 (diff) | |
download | CMake-c9c1eb99fe011546b5d9390c7fbbeebfda491c65.zip CMake-c9c1eb99fe011546b5d9390c7fbbeebfda491c65.tar.gz CMake-c9c1eb99fe011546b5d9390c7fbbeebfda491c65.tar.bz2 |
cmCPackGeneratorFactory: rule of zero
Diffstat (limited to 'Source/CPack/cpack.cxx')
-rw-r--r-- | Source/CPack/cpack.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index ab44a42..ce41d40 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -25,6 +25,7 @@ #include <cstddef> #include <iostream> #include <map> +#include <memory> #include <sstream> #include <string> #include <utility> @@ -237,7 +238,6 @@ int main(int argc, char const* const* argv) cmCPackGeneratorFactory generators; generators.SetLogger(&log); - cmCPackGenerator* cpackGenerator = nullptr; cmDocumentation doc; doc.addCPackStandardDocSections(); @@ -360,7 +360,8 @@ int main(int argc, char const* const* argv) parsed = 0; } if (parsed) { - cpackGenerator = generators.NewGenerator(gen); + std::unique_ptr<cmCPackGenerator> cpackGenerator = + generators.NewGenerator(gen); if (cpackGenerator) { cpackGenerator->SetTrace(trace); cpackGenerator->SetTraceExpand(traceExpand); |