View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0006215 | CMake | CMake | public | 2008-01-04 10:32 | 2016-06-10 14:30 | ||||
Reporter | Eric Wing | ||||||||
Assigned To | Bill Hoffman | ||||||||
Priority | normal | Severity | tweak | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0006215: FIND_LIBARY not returning the proper capitalization on found frameworks/libraries (OS X) | ||||||||
Description | Given a very simple CMakeLists.txt like this: FIND_PATH(OPENAL_INCLUDE_DIR al.h) FIND_LIBRARY(OPENAL_LIBRARY NAMES openal OpenAL) the FIND_LIBRARY will return /System/Library/Frameworks/openal.framework while FIND_PATH returns /System/Library/Frameworks/OpenAL.framework/Headers Notice the capitalization difference. The actual directory name is OpenAL.framework so it should have upper-case letters. At first, I thought FIND_LIBRARY was lower-casing the letters and would cause a problem with file systems that are case-sensitive. But I now suspect that it is an artifact of searching against the list of NAMES and "openal" is before "OpenAL", and because I am on a case-insensitive filesystem, the all-lowercase version produces a match and is taken. So this actually may not be an actual problem. However, it would probably be good to return the proper capitalization to the file anyway. This is more consistent and prevent anybody from over reacting like me. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0010070) Bill Hoffman (manager) 2008-01-04 10:40 |
This is because FIND_LIBRARY(OPENAL_LIBRARY NAMES openal OpenAL) has both cases, if you changed the order it would find the upper case one first. On windows there is a function to get the actual case of a path. Is there some thing like this for the Mac? This will not be a problem on a different file system because it won't find the wrong case version. |
(0010073) Sean McBride (reporter) 2008-01-04 13:06 |
This reminds me of bug 4572. The following snippit seems to get us from wrong case to right case: FSRef fsRef; OSStatus err; UInt8 foo[PATH_MAX]; err = FSPathMakeRef ("/sysTem/liBrary/frameWorks/", &fsRef, NULL); err = FSRefMakePath (&fsRef, foo, sizeof(foo)); the starting path would need to exist on disk though! I'm not 100% sure if this is guaranteed to work, or if it's relying on undocumented behaviour. |
(0027116) Sean McBride (reporter) 2011-07-29 11:38 |
This bug (0006215) and my bug 0008563 are dupes I think. Instead of that FSRef stuff, I believe realpath() could be used, see 'man 3 realpath'. |
(0041405) Kitware Robot (administrator) 2016-06-10 14:27 |
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. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2008-01-04 10:32 | Eric Wing | New Issue | |
2008-01-04 10:40 | Bill Hoffman | Note Added: 0010070 | |
2008-01-04 10:40 | Bill Hoffman | Status | new => assigned |
2008-01-04 10:40 | Bill Hoffman | Assigned To | => Bill Hoffman |
2008-01-04 13:06 | Sean McBride | Note Added: 0010073 | |
2009-02-19 17:25 | Bill Hoffman | Relationship added | has duplicate 0008563 |
2011-07-29 11:38 | Sean McBride | Note Added: 0027116 | |
2016-06-10 14:27 | Kitware Robot | Note Added: 0041405 | |
2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved |
2016-06-10 14:27 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:30 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |