[cmake-developers] [CMake 0014091]: get_filename_component PATH docs and parameter naming kinda suck
Mantis Bug Tracker
mantis at public.kitware.com
Mon Apr 15 17:20:22 EDT 2013
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=14091
======================================================================
Reported By: Dave Abrahams
Assigned To:
======================================================================
Project: CMake
Issue ID: 14091
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2013-04-15 17:20 EDT
Last Modified: 2013-04-15 17:20 EDT
======================================================================
Summary: get_filename_component PATH docs and parameter
naming kinda suck
Description:
<rant on>
get_filename_component
Get a specific component of a full filename.
get_filename_component(<VAR> FileName
PATH|ABSOLUTE|NAME|EXT|NAME_WE|REALPATH
[CACHE])
Set <VAR> to be the path (PATH), file name (NAME), file
extension
(EXT), file name without extension (NAME_WE) of FileName, the
full
path (ABSOLUTE), or the full path with all symlinks resolved
(REAL-
PATH). Note that the path is converted to Unix slashes format
and
What PATH actually does is not to get the "path of FIlename", but the directory
of Filename. The fact that ABSOLUTE actually does get the path of filename
should make this screamingly obvious. It's not like the results of PATH are
some relative version of what ABSOLUTE yields. Nobody should have to troll
stackoverflow
(http://stackoverflow.com/questions/7035734/cmake-parent-directory) for answers
like this one. Recommended fix: deprecate PATH and replace it with DIRECTORY
</rant off>
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-04-15 17:20 Dave Abrahams New Issue
======================================================================
More information about the cmake-developers
mailing list