diff options
author | Brad King <brad.king@kitware.com> | 2014-02-21 21:47:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-02-21 22:05:26 (GMT) |
commit | 6e89c8a5f1d5aa9bffa95be2b1add8d2c4e55026 (patch) | |
tree | cc732c0ab42e7435005ac0c51f71b765f28b828e /Source/cmInstallCommand.cxx | |
parent | f11f7b34a8e77c3bd68578f00b57e0884cb0d872 (diff) | |
download | CMake-6e89c8a5f1d5aa9bffa95be2b1add8d2c4e55026.zip CMake-6e89c8a5f1d5aa9bffa95be2b1add8d2c4e55026.tar.gz CMake-6e89c8a5f1d5aa9bffa95be2b1add8d2c4e55026.tar.bz2 |
install: Support generator expressions in FILES and PROGRAMS mode
Teach the install(FILES) and install(PROGRAMS) commands to evaluate
generator expressions in the list of files.
Extend the ExportImport test to cover installation cases involving
generator expressions.
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r-- | Source/cmInstallCommand.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index f4fbb8a..0878aae 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -1355,7 +1355,8 @@ bool cmInstallCommand::MakeFilesFullPath(const char* modeName, ++fileIt) { std::string file = (*fileIt); - if(!cmSystemTools::FileIsFullPath(file.c_str())) + std::string::size_type gpos = cmGeneratorExpression::Find(file); + if(gpos != 0 && !cmSystemTools::FileIsFullPath(file.c_str())) { file = this->Makefile->GetCurrentDirectory(); file += "/"; @@ -1363,7 +1364,7 @@ bool cmInstallCommand::MakeFilesFullPath(const char* modeName, } // Make sure the file is not a directory. - if(cmSystemTools::FileIsDirectory(file.c_str())) + if(gpos == file.npos && cmSystemTools::FileIsDirectory(file.c_str())) { cmOStringStream e; e << modeName << " given directory \"" << (*fileIt) << "\" to install."; |