MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0008378 | CMake | CMake | public | 2009-01-15 03:55 | 2009-02-09 08:26 | |||||
Reporter | Markus Schwarzenberg | |||||||||
Assigned To | Bill Hoffman | |||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||
Status | closed | Resolution | fixed | |||||||
Platform | OS | OS Version | ||||||||
Product Version | CMake-2-6 | |||||||||
Target Version | Fixed in Version | |||||||||
Summary | 0008378: UNC-path truncation in lists used in set and get_filename_component | |||||||||
Description | Using cmake (2.6.2/WIN32) there is an issue with UNC-paths used in the set variant set(<variable> <value> CACHE <type> <docstring> ) when <value> is a list (of paths) and <type> is FILEPATH. In this case, the (essential) double slashes // at the beginning of UNC path list components get truncated to single slashes, resulting in invalid UNC-paths. The same problem exists with get_filename_component(<variable> <value> PATH) Please consider the following test case: set (TESTRUN_VAR1 "//server/dir1/file1.txt" "//server/dir1/file2.txt" CACHE STRING "TESTRUN_VAR1") message("1: TESTRUN_VAR1 = ${TESTRUN_VAR1}" ) set (TESTRUN_VAR2 "//server/dir1/file1.txt" "//server/dir1/file2.txt" CACHE FILEPATH "TESTRUN_VAR2") message("2: TESTRUN_VAR2 = ${TESTRUN_VAR2}" ) set (TESTRUN_VAR3 "//server/dir1/file1.txt" "//server/dir1/file2.txt" ) message("3: TESTRUN_VAR3 = ${TESTRUN_VAR3}" ) set (TESTRUN_VAR4 "//server/dir1/file1.txt" CACHE FILEPATH "TESTRUN_VAR4") message("4: TESTRUN_VAR4 = ${TESTRUN_VAR4}" ) get_filename_component(__OUT "${TESTRUN_VAR1}" PATH) message("5: get_filename_component (TESTRUN_VAR1 PATH) = ${__OUT}") get_filename_component(__OUT "${TESTRUN_VAR4}" PATH) message("6: get_filename_component (TESTRUN_VAR4 PATH) = ${__OUT}") Output: 1: TESTRUN_VAR1 = //server/dir1/file1.txt;//server/dir1/file2.txt 2: TESTRUN_VAR2 = /server/dir1/file1.txt;/server/dir1/file2.txt 3: TESTRUN_VAR3 = //server/dir1/file1.txt;//server/dir1/file2.txt 4: TESTRUN_VAR4 = //server/dir1/file1.txt 5: get_filename_component (TESTRUN_VAR1 PATH) = /server/dir1/file1.txt;/server/dir1 6: get_filename_component (TESTRUN_VAR4 PATH) = //server/dir1 Conclusions: 1: set works correctly when CACHE STRING is used instead of CACHE FILEPATH 2: set is wrong when CACHE FILEPATH is used 3: set works correctly whithout using CACHE ... 4: set works correctly with CACHE FILEPATH when <value> is NOT a list 5: get_filename_component( ... PATH) is wrong when <value> is a list 6: get_filename_component( ... PATH) works correctly when <value> is a NOT list These issues are of practical relevance for example in Find_Package(Boost). resulting in illegal paths when Boost is located using an UNC-Path. A temporary workaround can be found in http://public.kitware.com/Bug/view.php?id=8099 [^] | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | ||||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2009-01-15 03:55 | Markus Schwarzenberg | New Issue | ||||||||
2009-01-18 14:45 | Philip Lowman | Relationship added | parent of 0008393 | |||||||
2009-02-03 11:31 | Bill Hoffman | Status | new => assigned | |||||||
2009-02-03 11:31 | Bill Hoffman | Assigned To | => Bill Hoffman | |||||||
2009-02-09 08:26 | Bill Hoffman | Note Added: 0014840 | ||||||||
2009-02-09 08:26 | Bill Hoffman | Status | assigned => closed | |||||||
2009-02-09 08:26 | Bill Hoffman | Resolution | open => fixed |
Notes | |||||
|
|||||
|
|