mirror of
https://github.com/reactos/CMake.git
synced 2024-11-28 22:10:32 +00:00
-strip trailing whitespace
Alex
This commit is contained in:
parent
c7dab4b936
commit
b6fba35411
@ -12,7 +12,7 @@
|
|||||||
# (To distribute this file outside of CMake, substitute the full
|
# (To distribute this file outside of CMake, substitute the full
|
||||||
# License text for the above reference.)
|
# License text for the above reference.)
|
||||||
|
|
||||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
|
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
|
||||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
|
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
|
||||||
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
|
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
|
||||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
|
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
|
||||||
@ -42,7 +42,7 @@ SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
|
|||||||
SET (CMAKE_SKIP_INSTALL_RPATH "NO" CACHE BOOL
|
SET (CMAKE_SKIP_INSTALL_RPATH "NO" CACHE BOOL
|
||||||
"If set, runtime paths are not added when installing shared libraries, but are added when building.")
|
"If set, runtime paths are not added when installing shared libraries, but are added when building.")
|
||||||
|
|
||||||
SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
|
SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
|
||||||
|
|
||||||
IF(CMAKE_GENERATOR MATCHES "Makefiles")
|
IF(CMAKE_GENERATOR MATCHES "Makefiles")
|
||||||
SET(CMAKE_COLOR_MAKEFILE ON CACHE BOOL
|
SET(CMAKE_COLOR_MAKEFILE ON CACHE BOOL
|
||||||
|
@ -23,25 +23,25 @@
|
|||||||
static cmInstallTargetGenerator* CreateInstallTargetGenerator(cmTarget& target,
|
static cmInstallTargetGenerator* CreateInstallTargetGenerator(cmTarget& target,
|
||||||
const cmInstallCommandArguments& args, bool impLib, bool forceOpt = false)
|
const cmInstallCommandArguments& args, bool impLib, bool forceOpt = false)
|
||||||
{
|
{
|
||||||
return new cmInstallTargetGenerator(target, args.GetDestination().c_str(),
|
return new cmInstallTargetGenerator(target, args.GetDestination().c_str(),
|
||||||
impLib, args.GetPermissions().c_str(),
|
impLib, args.GetPermissions().c_str(),
|
||||||
args.GetConfigurations(), args.GetComponent().c_str(),
|
args.GetConfigurations(), args.GetComponent().c_str(),
|
||||||
args.GetOptional() || forceOpt);
|
args.GetOptional() || forceOpt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cmInstallFilesGenerator* CreateInstallFilesGenerator(
|
static cmInstallFilesGenerator* CreateInstallFilesGenerator(
|
||||||
const std::vector<std::string>& absFiles,
|
const std::vector<std::string>& absFiles,
|
||||||
const cmInstallCommandArguments& args, bool programs)
|
const cmInstallCommandArguments& args, bool programs)
|
||||||
{
|
{
|
||||||
return new cmInstallFilesGenerator(absFiles, args.GetDestination().c_str(),
|
return new cmInstallFilesGenerator(absFiles, args.GetDestination().c_str(),
|
||||||
programs, args.GetPermissions().c_str(),
|
programs, args.GetPermissions().c_str(),
|
||||||
args.GetConfigurations(), args.GetComponent().c_str(),
|
args.GetConfigurations(), args.GetComponent().c_str(),
|
||||||
args.GetRename().c_str(), args.GetOptional());
|
args.GetRename().c_str(), args.GetOptional());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// cmInstallCommand
|
// cmInstallCommand
|
||||||
bool cmInstallCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmInstallCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus &)
|
cmExecutionStatus &)
|
||||||
{
|
{
|
||||||
// Allow calling with no arguments so that arguments may be built up
|
// Allow calling with no arguments so that arguments may be built up
|
||||||
@ -190,7 +190,7 @@ bool cmInstallCommand::HandleScriptMode(std::vector<std::string> const& args)
|
|||||||
|
|
||||||
/*struct InstallPart
|
/*struct InstallPart
|
||||||
{
|
{
|
||||||
InstallPart(cmCommandArgumentsHelper* helper, const char* key,
|
InstallPart(cmCommandArgumentsHelper* helper, const char* key,
|
||||||
cmCommandArgumentGroup* group);
|
cmCommandArgumentGroup* group);
|
||||||
cmCAStringVector argVector;
|
cmCAStringVector argVector;
|
||||||
cmInstallCommandArguments args;
|
cmInstallCommandArguments args;
|
||||||
@ -239,7 +239,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
|||||||
cmInstallCommandArguments publicHeaderArgs;
|
cmInstallCommandArguments publicHeaderArgs;
|
||||||
cmInstallCommandArguments resourceArgs;
|
cmInstallCommandArguments resourceArgs;
|
||||||
|
|
||||||
// now parse the args for specific parts of the target (e.g. LIBRARY,
|
// now parse the args for specific parts of the target (e.g. LIBRARY,
|
||||||
// RUNTIME, ARCHIVE etc.
|
// RUNTIME, ARCHIVE etc.
|
||||||
archiveArgs.Parse (&archiveArgVector.GetVector(), &unknownArgs);
|
archiveArgs.Parse (&archiveArgVector.GetVector(), &unknownArgs);
|
||||||
libraryArgs.Parse (&libraryArgVector.GetVector(), &unknownArgs);
|
libraryArgs.Parse (&libraryArgVector.GetVector(), &unknownArgs);
|
||||||
@ -345,7 +345,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
|||||||
this->Makefile->IsOn("CYGWIN") ||
|
this->Makefile->IsOn("CYGWIN") ||
|
||||||
this->Makefile->IsOn("MINGW"));
|
this->Makefile->IsOn("MINGW"));
|
||||||
|
|
||||||
for(std::vector<std::string>::const_iterator
|
for(std::vector<std::string>::const_iterator
|
||||||
targetIt=targetList.GetVector().begin();
|
targetIt=targetList.GetVector().begin();
|
||||||
targetIt!=targetList.GetVector().end();
|
targetIt!=targetList.GetVector().end();
|
||||||
++targetIt)
|
++targetIt)
|
||||||
@ -422,7 +422,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
|||||||
case cmTarget::SHARED_LIBRARY:
|
case cmTarget::SHARED_LIBRARY:
|
||||||
{
|
{
|
||||||
// Shared libraries are handled differently on DLL and non-DLL
|
// Shared libraries are handled differently on DLL and non-DLL
|
||||||
// platforms. All windows platforms are DLL platforms including
|
// platforms. All windows platforms are DLL platforms including
|
||||||
// cygwin. Currently no other platform is a DLL platform.
|
// cygwin. Currently no other platform is a DLL platform.
|
||||||
if(dll_platform)
|
if(dll_platform)
|
||||||
{
|
{
|
||||||
@ -436,13 +436,13 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
|||||||
if(!archiveArgs.GetDestination().empty())
|
if(!archiveArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
// The import library uses the ARCHIVE properties.
|
// The import library uses the ARCHIVE properties.
|
||||||
archiveGenerator = CreateInstallTargetGenerator(target,
|
archiveGenerator = CreateInstallTargetGenerator(target,
|
||||||
archiveArgs, true);
|
archiveArgs, true);
|
||||||
}
|
}
|
||||||
if(!runtimeArgs.GetDestination().empty())
|
if(!runtimeArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
// The DLL uses the RUNTIME properties.
|
// The DLL uses the RUNTIME properties.
|
||||||
runtimeGenerator = CreateInstallTargetGenerator(target,
|
runtimeGenerator = CreateInstallTargetGenerator(target,
|
||||||
runtimeArgs, false);
|
runtimeArgs, false);
|
||||||
}
|
}
|
||||||
if ((archiveGenerator==0) && (runtimeGenerator==0))
|
if ((archiveGenerator==0) && (runtimeGenerator==0))
|
||||||
@ -467,7 +467,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
|||||||
// Use the FRAMEWORK properties.
|
// Use the FRAMEWORK properties.
|
||||||
if (!frameworkArgs.GetDestination().empty())
|
if (!frameworkArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
frameworkGenerator = CreateInstallTargetGenerator(target,
|
frameworkGenerator = CreateInstallTargetGenerator(target,
|
||||||
frameworkArgs, false);
|
frameworkArgs, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -484,7 +484,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
|||||||
// The shared library uses the LIBRARY properties.
|
// The shared library uses the LIBRARY properties.
|
||||||
if (!libraryArgs.GetDestination().empty())
|
if (!libraryArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
libraryGenerator = CreateInstallTargetGenerator(target,
|
libraryGenerator = CreateInstallTargetGenerator(target,
|
||||||
libraryArgs, false);
|
libraryArgs, false);
|
||||||
libraryGenerator->SetNamelinkMode(namelinkMode);
|
libraryGenerator->SetNamelinkMode(namelinkMode);
|
||||||
namelinkOnly =
|
namelinkOnly =
|
||||||
@ -507,7 +507,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
|||||||
// Static libraries use ARCHIVE properties.
|
// Static libraries use ARCHIVE properties.
|
||||||
if (!archiveArgs.GetDestination().empty())
|
if (!archiveArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
archiveGenerator = CreateInstallTargetGenerator(target, archiveArgs,
|
archiveGenerator = CreateInstallTargetGenerator(target, archiveArgs,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -525,7 +525,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
|||||||
// Modules use LIBRARY properties.
|
// Modules use LIBRARY properties.
|
||||||
if (!libraryArgs.GetDestination().empty())
|
if (!libraryArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
libraryGenerator = CreateInstallTargetGenerator(target, libraryArgs,
|
libraryGenerator = CreateInstallTargetGenerator(target, libraryArgs,
|
||||||
false);
|
false);
|
||||||
libraryGenerator->SetNamelinkMode(namelinkMode);
|
libraryGenerator->SetNamelinkMode(namelinkMode);
|
||||||
namelinkOnly =
|
namelinkOnly =
|
||||||
@ -548,7 +548,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
|||||||
// Application bundles use the BUNDLE properties.
|
// Application bundles use the BUNDLE properties.
|
||||||
if (!bundleArgs.GetDestination().empty())
|
if (!bundleArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
bundleGenerator = CreateInstallTargetGenerator(target, bundleArgs,
|
bundleGenerator = CreateInstallTargetGenerator(target, bundleArgs,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
else if(!runtimeArgs.GetDestination().empty())
|
else if(!runtimeArgs.GetDestination().empty())
|
||||||
@ -580,7 +580,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
|||||||
// Executables use the RUNTIME properties.
|
// Executables use the RUNTIME properties.
|
||||||
if (!runtimeArgs.GetDestination().empty())
|
if (!runtimeArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
runtimeGenerator = CreateInstallTargetGenerator(target,
|
runtimeGenerator = CreateInstallTargetGenerator(target,
|
||||||
runtimeArgs, false);
|
runtimeArgs, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -600,7 +600,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
|||||||
target.IsExecutableWithExports())
|
target.IsExecutableWithExports())
|
||||||
{
|
{
|
||||||
// The import library uses the ARCHIVE properties.
|
// The import library uses the ARCHIVE properties.
|
||||||
archiveGenerator = CreateInstallTargetGenerator(target,
|
archiveGenerator = CreateInstallTargetGenerator(target,
|
||||||
archiveArgs, true, true);
|
archiveArgs, true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -710,7 +710,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
|||||||
installsRuntime = installsRuntime || runtimeGenerator != 0;
|
installsRuntime = installsRuntime || runtimeGenerator != 0;
|
||||||
installsFramework = installsFramework || frameworkGenerator != 0;
|
installsFramework = installsFramework || frameworkGenerator != 0;
|
||||||
installsBundle = installsBundle || bundleGenerator != 0;
|
installsBundle = installsBundle || bundleGenerator != 0;
|
||||||
installsPrivateHeader = installsPrivateHeader
|
installsPrivateHeader = installsPrivateHeader
|
||||||
|| privateHeaderGenerator != 0;
|
|| privateHeaderGenerator != 0;
|
||||||
installsPublicHeader = installsPublicHeader || publicHeaderGenerator != 0;
|
installsPublicHeader = installsPublicHeader || publicHeaderGenerator != 0;
|
||||||
installsResource = installsResource || resourceGenerator;
|
installsResource = installsResource || resourceGenerator;
|
||||||
@ -729,7 +729,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
|||||||
if(!exports.GetString().empty() && !namelinkOnly)
|
if(!exports.GetString().empty() && !namelinkOnly)
|
||||||
{
|
{
|
||||||
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
||||||
->AddTargetToExports(exports.GetCString(), &target,
|
->AddTargetToExports(exports.GetCString(), &target,
|
||||||
archiveGenerator, runtimeGenerator,
|
archiveGenerator, runtimeGenerator,
|
||||||
libraryGenerator, frameworkGenerator,
|
libraryGenerator, frameworkGenerator,
|
||||||
bundleGenerator, publicHeaderGenerator);
|
bundleGenerator, publicHeaderGenerator);
|
||||||
@ -803,7 +803,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
|
|||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str().c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if there is something to do.
|
// Check if there is something to do.
|
||||||
if(files.GetVector().empty())
|
if(files.GetVector().empty())
|
||||||
{
|
{
|
||||||
|
@ -337,7 +337,7 @@ private:
|
|||||||
bool HandleFilesMode(std::vector<std::string> const& args);
|
bool HandleFilesMode(std::vector<std::string> const& args);
|
||||||
bool HandleDirectoryMode(std::vector<std::string> const& args);
|
bool HandleDirectoryMode(std::vector<std::string> const& args);
|
||||||
bool HandleExportMode(std::vector<std::string> const& args);
|
bool HandleExportMode(std::vector<std::string> const& args);
|
||||||
bool MakeFilesFullPath(const char* modeName,
|
bool MakeFilesFullPath(const char* modeName,
|
||||||
const std::vector<std::string>& relFiles,
|
const std::vector<std::string>& relFiles,
|
||||||
std::vector<std::string>& absFiles);
|
std::vector<std::string>& absFiles);
|
||||||
bool CheckCMP0006(bool& failure);
|
bool CheckCMP0006(bool& failure);
|
||||||
|
@ -130,7 +130,7 @@ bool cmInstallCommandArguments::GetNamelinkSkip() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<std::string>&
|
const std::vector<std::string>&
|
||||||
cmInstallCommandArguments::GetConfigurations() const
|
cmInstallCommandArguments::GetConfigurations() const
|
||||||
{
|
{
|
||||||
if (!this->Configurations.GetVector().empty())
|
if (!this->Configurations.GetVector().empty())
|
||||||
@ -156,7 +156,7 @@ bool cmInstallCommandArguments::Finalize()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmInstallCommandArguments::Parse(const std::vector<std::string>* args,
|
void cmInstallCommandArguments::Parse(const std::vector<std::string>* args,
|
||||||
std::vector<std::string>* unconsumedArgs)
|
std::vector<std::string>* unconsumedArgs)
|
||||||
{
|
{
|
||||||
this->Parser.Parse(args, unconsumedArgs);
|
this->Parser.Parse(args, unconsumedArgs);
|
||||||
@ -166,9 +166,9 @@ void cmInstallCommandArguments::Parse(const std::vector<std::string>* args,
|
|||||||
bool cmInstallCommandArguments::CheckPermissions()
|
bool cmInstallCommandArguments::CheckPermissions()
|
||||||
{
|
{
|
||||||
this->PermissionsString = "";
|
this->PermissionsString = "";
|
||||||
for(std::vector<std::string>::const_iterator
|
for(std::vector<std::string>::const_iterator
|
||||||
permIt = this->Permissions.GetVector().begin();
|
permIt = this->Permissions.GetVector().begin();
|
||||||
permIt != this->Permissions.GetVector().end();
|
permIt != this->Permissions.GetVector().end();
|
||||||
++permIt)
|
++permIt)
|
||||||
{
|
{
|
||||||
if (!this->CheckPermissions(*permIt, this->PermissionsString))
|
if (!this->CheckPermissions(*permIt, this->PermissionsString))
|
||||||
@ -183,7 +183,7 @@ bool cmInstallCommandArguments::CheckPermissions(
|
|||||||
const std::string& onePermission, std::string& permissions)
|
const std::string& onePermission, std::string& permissions)
|
||||||
{
|
{
|
||||||
// Check the permission against the table.
|
// Check the permission against the table.
|
||||||
for(const char** valid = cmInstallCommandArguments::PermissionsTable;
|
for(const char** valid = cmInstallCommandArguments::PermissionsTable;
|
||||||
*valid; ++valid)
|
*valid; ++valid)
|
||||||
{
|
{
|
||||||
if(onePermission == *valid)
|
if(onePermission == *valid)
|
||||||
|
@ -20,9 +20,9 @@ class cmInstallCommandArguments
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmInstallCommandArguments();
|
cmInstallCommandArguments();
|
||||||
void SetGenericArguments(cmInstallCommandArguments* args)
|
void SetGenericArguments(cmInstallCommandArguments* args)
|
||||||
{this->GenericArguments = args;}
|
{this->GenericArguments = args;}
|
||||||
void Parse(const std::vector<std::string>* args,
|
void Parse(const std::vector<std::string>* args,
|
||||||
std::vector<std::string>* unconsumedArgs);
|
std::vector<std::string>* unconsumedArgs);
|
||||||
|
|
||||||
// Compute destination path.and check permissions
|
// Compute destination path.and check permissions
|
||||||
@ -37,10 +37,10 @@ class cmInstallCommandArguments
|
|||||||
bool GetNamelinkOnly() const;
|
bool GetNamelinkOnly() const;
|
||||||
bool GetNamelinkSkip() const;
|
bool GetNamelinkSkip() const;
|
||||||
|
|
||||||
// once HandleDirectoryMode() is also switched to using
|
// once HandleDirectoryMode() is also switched to using
|
||||||
// cmInstallCommandArguments then these two functions can become non-static
|
// cmInstallCommandArguments then these two functions can become non-static
|
||||||
// private member functions without arguments
|
// private member functions without arguments
|
||||||
static bool CheckPermissions(const std::string& onePerm,
|
static bool CheckPermissions(const std::string& onePerm,
|
||||||
std::string& perm);
|
std::string& perm);
|
||||||
cmCommandArgumentsHelper Parser;
|
cmCommandArgumentsHelper Parser;
|
||||||
cmCommandArgumentGroup ArgumentGroup;
|
cmCommandArgumentGroup ArgumentGroup;
|
||||||
|
@ -34,7 +34,7 @@ bool cmInstallFilesCommand
|
|||||||
|
|
||||||
if((args.size() > 1) && (args[1] == "FILES"))
|
if((args.size() > 1) && (args[1] == "FILES"))
|
||||||
{
|
{
|
||||||
this->IsFilesForm = true;
|
this->IsFilesForm = true;
|
||||||
for(std::vector<std::string>::const_iterator s = args.begin()+2;
|
for(std::vector<std::string>::const_iterator s = args.begin()+2;
|
||||||
s != args.end(); ++s)
|
s != args.end(); ++s)
|
||||||
{
|
{
|
||||||
@ -53,45 +53,45 @@ bool cmInstallFilesCommand
|
|||||||
this->FinalArgs.push_back(*s);
|
this->FinalArgs.push_back(*s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
||||||
->AddInstallComponent("Unspecified");
|
->AddInstallComponent("Unspecified");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmInstallFilesCommand::FinalPass()
|
void cmInstallFilesCommand::FinalPass()
|
||||||
{
|
{
|
||||||
// No final pass for "FILES" form of arguments.
|
// No final pass for "FILES" form of arguments.
|
||||||
if(this->IsFilesForm)
|
if(this->IsFilesForm)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string testf;
|
std::string testf;
|
||||||
std::string ext = this->FinalArgs[0];
|
std::string ext = this->FinalArgs[0];
|
||||||
|
|
||||||
// two different options
|
// two different options
|
||||||
if (this->FinalArgs.size() > 1)
|
if (this->FinalArgs.size() > 1)
|
||||||
{
|
{
|
||||||
// now put the files into the list
|
// now put the files into the list
|
||||||
std::vector<std::string>::iterator s = this->FinalArgs.begin();
|
std::vector<std::string>::iterator s = this->FinalArgs.begin();
|
||||||
++s;
|
++s;
|
||||||
// for each argument, get the files
|
// for each argument, get the files
|
||||||
for (;s != this->FinalArgs.end(); ++s)
|
for (;s != this->FinalArgs.end(); ++s)
|
||||||
{
|
{
|
||||||
// replace any variables
|
// replace any variables
|
||||||
std::string temps = *s;
|
std::string temps = *s;
|
||||||
if (cmSystemTools::GetFilenamePath(temps).size() > 0)
|
if (cmSystemTools::GetFilenamePath(temps).size() > 0)
|
||||||
{
|
{
|
||||||
testf = cmSystemTools::GetFilenamePath(temps) + "/" +
|
testf = cmSystemTools::GetFilenamePath(temps) + "/" +
|
||||||
cmSystemTools::GetFilenameWithoutLastExtension(temps) + ext;
|
cmSystemTools::GetFilenameWithoutLastExtension(temps) + ext;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
testf = cmSystemTools::GetFilenameWithoutLastExtension(temps) + ext;
|
testf = cmSystemTools::GetFilenameWithoutLastExtension(temps) + ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
// add to the result
|
// add to the result
|
||||||
this->Files.push_back(this->FindInstallSource(testf.c_str()));
|
this->Files.push_back(this->FindInstallSource(testf.c_str()));
|
||||||
}
|
}
|
||||||
@ -102,9 +102,9 @@ void cmInstallFilesCommand::FinalPass()
|
|||||||
std::string regex = this->FinalArgs[0].c_str();
|
std::string regex = this->FinalArgs[0].c_str();
|
||||||
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
||||||
regex.c_str(), files);
|
regex.c_str(), files);
|
||||||
|
|
||||||
std::vector<std::string>::iterator s = files.begin();
|
std::vector<std::string>::iterator s = files.begin();
|
||||||
// for each argument, get the files
|
// for each argument, get the files
|
||||||
for (;s != files.end(); ++s)
|
for (;s != files.end(); ++s)
|
||||||
{
|
{
|
||||||
this->Files.push_back(this->FindInstallSource(s->c_str()));
|
this->Files.push_back(this->FindInstallSource(s->c_str()));
|
||||||
@ -151,7 +151,7 @@ std::string cmInstallFilesCommand::FindInstallSource(const char* name) const
|
|||||||
// This is a full path.
|
// This is a full path.
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a relative path.
|
// This is a relative path.
|
||||||
std::string tb = this->Makefile->GetCurrentOutputDirectory();
|
std::string tb = this->Makefile->GetCurrentOutputDirectory();
|
||||||
tb += "/";
|
tb += "/";
|
||||||
@ -159,7 +159,7 @@ std::string cmInstallFilesCommand::FindInstallSource(const char* name) const
|
|||||||
std::string ts = this->Makefile->GetCurrentDirectory();
|
std::string ts = this->Makefile->GetCurrentDirectory();
|
||||||
ts += "/";
|
ts += "/";
|
||||||
ts += name;
|
ts += name;
|
||||||
|
|
||||||
if(cmSystemTools::FileExists(tb.c_str()))
|
if(cmSystemTools::FileExists(tb.c_str()))
|
||||||
{
|
{
|
||||||
// The file exists in the binary tree. Use it.
|
// The file exists in the binary tree. Use it.
|
||||||
|
@ -31,26 +31,26 @@ bool cmInstallProgramsCommand
|
|||||||
for (++s;s != args.end(); ++s)
|
for (++s;s != args.end(); ++s)
|
||||||
{
|
{
|
||||||
this->FinalArgs.push_back(*s);
|
this->FinalArgs.push_back(*s);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
||||||
->AddInstallComponent("Unspecified");
|
->AddInstallComponent("Unspecified");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmInstallProgramsCommand::FinalPass()
|
void cmInstallProgramsCommand::FinalPass()
|
||||||
{
|
{
|
||||||
bool files_mode = false;
|
bool files_mode = false;
|
||||||
if(!this->FinalArgs.empty() && this->FinalArgs[0] == "FILES")
|
if(!this->FinalArgs.empty() && this->FinalArgs[0] == "FILES")
|
||||||
{
|
{
|
||||||
files_mode = true;
|
files_mode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// two different options
|
// two different options
|
||||||
if (this->FinalArgs.size() > 1 || files_mode)
|
if (this->FinalArgs.size() > 1 || files_mode)
|
||||||
{
|
{
|
||||||
// for each argument, get the programs
|
// for each argument, get the programs
|
||||||
std::vector<std::string>::iterator s = this->FinalArgs.begin();
|
std::vector<std::string>::iterator s = this->FinalArgs.begin();
|
||||||
if(files_mode)
|
if(files_mode)
|
||||||
{
|
{
|
||||||
@ -68,9 +68,9 @@ void cmInstallProgramsCommand::FinalPass()
|
|||||||
std::vector<std::string> programs;
|
std::vector<std::string> programs;
|
||||||
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
||||||
this->FinalArgs[0].c_str(), programs);
|
this->FinalArgs[0].c_str(), programs);
|
||||||
|
|
||||||
std::vector<std::string>::iterator s = programs.begin();
|
std::vector<std::string>::iterator s = programs.begin();
|
||||||
// for each argument, get the programs
|
// for each argument, get the programs
|
||||||
for (;s != programs.end(); ++s)
|
for (;s != programs.end(); ++s)
|
||||||
{
|
{
|
||||||
this->Files.push_back(this->FindInstallSource(s->c_str()));
|
this->Files.push_back(this->FindInstallSource(s->c_str()));
|
||||||
@ -112,7 +112,7 @@ std::string cmInstallProgramsCommand
|
|||||||
// This is a full path.
|
// This is a full path.
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a relative path.
|
// This is a relative path.
|
||||||
std::string tb = this->Makefile->GetCurrentOutputDirectory();
|
std::string tb = this->Makefile->GetCurrentOutputDirectory();
|
||||||
tb += "/";
|
tb += "/";
|
||||||
@ -120,7 +120,7 @@ std::string cmInstallProgramsCommand
|
|||||||
std::string ts = this->Makefile->GetCurrentDirectory();
|
std::string ts = this->Makefile->GetCurrentDirectory();
|
||||||
ts += "/";
|
ts += "/";
|
||||||
ts += name;
|
ts += name;
|
||||||
|
|
||||||
if(cmSystemTools::FileExists(tb.c_str()))
|
if(cmSystemTools::FileExists(tb.c_str()))
|
||||||
{
|
{
|
||||||
// The file exists in the binary tree. Use it.
|
// The file exists in the binary tree. Use it.
|
||||||
|
Loading…
Reference in New Issue
Block a user