diff options
author | Yves Frederix <yves.frederix@gmail.com> | 2016-08-29 20:24:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-08-31 13:33:39 (GMT) |
commit | 3bd55dba7c889776bd094c6c29045c567b9000e2 (patch) | |
tree | 68df51d4d806de4b4122f05c6a51a74b6fb12c08 /Source/cmInstallCommand.cxx | |
parent | 0a2d0b126ca01a7d989a887c71693989e9d15224 (diff) | |
download | CMake-3bd55dba7c889776bd094c6c29045c567b9000e2.zip CMake-3bd55dba7c889776bd094c6c29045c567b9000e2.tar.gz CMake-3bd55dba7c889776bd094c6c29045c567b9000e2.tar.bz2 |
install: Fix evaluation of leading generator expressions in DIRECTORY
Since commit v3.5.0-rc1~58^2 (install: Allow generator expressions in
DIRECTORY, 2016-01-12) we accidentally treat leading generator
expressions as relative paths even though they may evaluate to absolute
paths. Defer the conversion to an absolute path until after evaluation.
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r-- | Source/cmInstallCommand.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 86ab85a..4912eac 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -976,7 +976,8 @@ bool cmInstallCommand::HandleDirectoryMode( } else if (doing == DoingDirs) { // Convert this directory to a full path. std::string dir = args[i]; - if (!cmSystemTools::FileIsFullPath(dir.c_str())) { + std::string::size_type gpos = cmGeneratorExpression::Find(dir); + if (gpos != 0 && !cmSystemTools::FileIsFullPath(dir.c_str())) { dir = this->Makefile->GetCurrentSourceDirectory(); dir += "/"; dir += args[i]; |