From 2e18801a1bf4e313fc2ec25d9a8842312728e1be Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Wed, 30 Nov 2016 11:19:28 +0100 Subject: QtAutogen: Move util functions to file begin --- Source/cmQtAutoGeneratorInitializer.cxx | 40 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index df15920..d444039 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -35,6 +35,26 @@ #include #include +static void utilCopyTargetProperty(cmTarget* destinationTarget, + cmTarget* sourceTarget, + const std::string& propertyName) +{ + const char* propertyValue = sourceTarget->GetProperty(propertyName); + if (propertyValue) { + destinationTarget->SetProperty(propertyName, propertyValue); + } +} + +static std::string utilStripCR(std::string const& line) +{ + // Strip CR characters rcc may have printed (possibly more than one!). + std::string::size_type cr = line.find('\r'); + if (cr != line.npos) { + return line.substr(0, cr); + } + return line; +} + static std::string GetAutogenTargetName(cmGeneratorTarget const* target) { std::string autogenTargetName = target->GetName(); @@ -404,26 +424,6 @@ static void RccMergeOptions(std::vector& opts, opts.insert(opts.end(), extraOpts.begin(), extraOpts.end()); } -static void utilCopyTargetProperty(cmTarget* destinationTarget, - cmTarget* sourceTarget, - const std::string& propertyName) -{ - const char* propertyValue = sourceTarget->GetProperty(propertyName); - if (propertyValue) { - destinationTarget->SetProperty(propertyName, propertyValue); - } -} - -static std::string utilStripCR(std::string const& line) -{ - // Strip CR characters rcc may have printed (possibly more than one!). - std::string::size_type cr = line.find('\r'); - if (cr != line.npos) { - return line.substr(0, cr); - } - return line; -} - /// @brief Reads the resource files list from from a .qrc file - Qt5 version /// @return True if the .qrc file was successfully parsed static bool RccListInputsQt5(cmSourceFile* sf, cmGeneratorTarget const* target, -- cgit v0.12