diff options
author | Brad King <brad.king@kitware.com> | 2015-08-10 13:13:20 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-08-10 13:13:20 (GMT) |
commit | 16b889da9a625d4501beb2150e2635c9608c729e (patch) | |
tree | b1eb7ef96a6459754cc187664f778a9f5dc93697 /Source | |
parent | 3d0a719b703a2d4dd9b38b54847453a3f5a2d7f7 (diff) | |
parent | d035e9687a2d28e2f64ec3a316f8abea57e49d63 (diff) | |
download | CMake-16b889da9a625d4501beb2150e2635c9608c729e.zip CMake-16b889da9a625d4501beb2150e2635c9608c729e.tar.gz CMake-16b889da9a625d4501beb2150e2635c9608c729e.tar.bz2 |
Merge topic 'fix-get-filename-component'
d035e968 get_filename_component: Fix bug where CACHE was ignored.
38ed5866 get_filename_component: Added initial tests for PROGRAM component.
772ca69f get_filename_component: Tests now check for proper CACHE usage.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGetFilenameComponentCommand.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx index 67f9f2d..13a9afb 100644 --- a/Source/cmGetFilenameComponentCommand.cxx +++ b/Source/cmGetFilenameComponentCommand.cxx @@ -24,7 +24,7 @@ bool cmGetFilenameComponentCommand // Check and see if the value has been stored in the cache // already, if so use that value - if(args.size() == 4 && args[3] == "CACHE") + if(args.size() >= 4 && args[args.size() - 1] == "CACHE") { const char* cacheValue = this->Makefile->GetDefinition(args[0]); if(cacheValue && !cmSystemTools::IsNOTFOUND(cacheValue)) @@ -111,7 +111,7 @@ bool cmGetFilenameComponentCommand return false; } - if(args.size() == 4 && args[3] == "CACHE") + if(args.size() >= 4 && args[args.size() - 1] == "CACHE") { if(!programArgs.empty() && !storeArgs.empty()) { |