MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0014022 | CMake | CMake | public | 2013-03-18 10:40 | 2016-06-10 14:31 |
|
Reporter | Petr Kmoch | |
Assigned To | Kitware Robot | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | moved | |
Platform | Unix | OS | | OS Version | |
Product Version | CMake 2.8.9 | |
Target Version | | Fixed in Version | | |
|
Summary | 0014022: if(EXISTS) returns false for broken symlinks |
Description | 'if(EXISTS arg)' evaluates to false if 'arg' is a symlink pointing to a non-existent file. To me, this feels like incorrect behaviour - arg itself exists, so the test should pass.
If the current behaviour is actually intended, I believe it should at least be documented.
With Windows symlinks, this does not happen; 'if(EXISTS arg)' evaluates to true if 'arg' is a broken link created with 'mklink'. |
Steps To Reproduce | $ ln -s target link
$ cmake -P test_link.cmake (attached)
$ touch target
$ cmake -P test_link.cmake
'link' exists in both cases, but first run reports 'link does not exist' |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | 0010468 | closed | Brad King | find_program() doesn't find not readable programs on *nix |
|
Attached Files | test_link.cmake (114) 2013-03-18 10:40 https://public.kitware.com/Bug/file/4688/* |
|
Issue History |
Date Modified | Username | Field | Change |
2013-03-18 10:40 | Petr Kmoch | New Issue | |
2013-03-18 10:40 | Petr Kmoch | File Added: test_link.cmake | |
2013-03-18 10:57 | Brad King | Relationship added | related to 0010468 |
2013-03-18 11:05 | Brad King | Note Added: 0032656 | |
2013-03-18 11:05 | Brad King | Status | new => backlog |
2013-03-26 08:27 | Brad King | Note Added: 0032702 | |
2014-03-24 18:05 | Ben Boeckel | Note Added: 0035496 | |
2014-03-26 11:02 | Brad King | Note Added: 0035529 | |
2016-06-10 14:28 | Kitware Robot | Note Added: 0042253 | |
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved |
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes |
|
(0032656)
|
Brad King
|
2013-03-18 11:05
|
|
|
|
(0032702)
|
Brad King
|
2013-03-26 08:27
|
|
|
|
(0035496)
|
Ben Boeckel
|
2014-03-24 18:05
|
|
Would a policy or a new keyword (FILENAME_EXISTS) be better? |
|
|
(0035529)
|
Brad King
|
2014-03-26 11:02
|
|
Re 0014022:0035496: I think a policy would be better. It will avoid carrying two almost identical interfaces and having to document the subtle difference. |
|
|
(0042253)
|
Kitware Robot
|
2016-06-10 14:28
|
|
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|