The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=14022 ====================================================================== Reported By: Petr Kmoch Assigned To: ====================================================================== Project: CMake Issue ID: 14022 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2013-03-18 15:40 CET Last Modified: 2013-03-18 15:40 CET ====================================================================== Summary: 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 <i>(attached)</i> $ touch target $ cmake -P test_link.cmake 'link' exists in both cases, but first run reports 'link does not exist' ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2013-03-18 15:40 Petr Kmoch New Issue 2013-03-18 15:40 Petr Kmoch File Added: test_link.cmake ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers