MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0011973 | CMake | (No Category) | public | 2011-03-15 15:32 | 2011-06-17 18:40 | |||||
Reporter | Aaron Simmons | |||||||||
Assigned To | Brad King | |||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||
Status | closed | Resolution | fixed | |||||||
Platform | Mac | OS | OS X | OS Version | 10.6 | |||||
Product Version | CMake 2.8.4 | |||||||||
Target Version | CMake 2.8.5 | Fixed in Version | CMake 2.8.5 | |||||||
Summary | 0011973: double-slashes in paths breaks dependency resolution | |||||||||
Description | Concatenating paths often leads to double-slashes. Most software seems to be able to deal with this, including CMake (2.8.3 and previous). However, CMake 2.8.4 can't handle it. | |||||||||
Steps To Reproduce | 1) Here is an example CMakeLists.txt: cmake_minimum_required(VERSION 2.8.4) project(test) set(dir_to ${CMAKE_BINARY_DIR}/files/) # note the trailing sash set(myfile_from ${CMAKE_CURRENT_SOURCE_DIR}/myfile.txt) set(myfile_to ${dir_to}/myfile.txt) get_filename_component( parent_to ${myfile_to} PATH ) message("${myfile_from} => ${myfile_to}") ADD_CUSTOM_COMMAND( OUTPUT ${myfile_to} COMMAND ${CMAKE_COMMAND} -E make_directory ${dir_to} COMMAND ${CMAKE_COMMAND} -E copy ${myfile_from} ${myfile_to} DEPENDS ${myfile_from} ) add_custom_target(copyit DEPENDS ${myfile_to}) 2) Run it: asimmons-mac:.build asimmons$ rm -rf *; cmake ..; make copyit -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done /Users/asimmons/Development/test/cmake/myfile.txt => /Users/asimmons/Development/test/cmake/.build/files//myfile.txt -- Configuring done -- Generating done -- Build files have been written to: /Users/asimmons/Development/test/cmake/.build Scanning dependencies of target copyit make[3]: *** No rule to make target `files/myfile.txt', needed by `CMakeFiles/copyit'. Stop. make[2]: *** [CMakeFiles/copyit.dir/all] Error 2 make[1]: *** [CMakeFiles/copyit.dir/rule] Error 2 make: *** [copyit] Error 2 3) Removing the trailing slash from line 4 will workaround the problem. | |||||||||
Additional Information | Notice that the error output (*** No rule to make target `files/myfile.txt') has removed the double-slash. It seems like part of CMake can deal with the double-slash, but others can't. Since previous CMake verions (2.8.3-) could deal with double-slashes, I assume that this is a bug. If its deliberate, I urge you to consider the pain involved in constantly checking path concatenations for double slashes. At least provide some kind of "path concat" function. | |||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2011-03-15 15:32 | Aaron Simmons | New Issue | ||||||||
2011-03-29 18:09 | Brad King | Relationship added | related to 0010485 | |||||||
2011-03-29 18:09 | Brad King | Assigned To | => Brad King | |||||||
2011-03-29 18:09 | Brad King | Status | new => assigned | |||||||
2011-03-29 18:11 | Brad King | Note Added: 0025958 | ||||||||
2011-03-29 18:20 | Brad King | Note Added: 0025959 | ||||||||
2011-03-30 10:05 | Brad King | Note Added: 0025968 | ||||||||
2011-03-30 10:05 | Brad King | Status | assigned => closed | |||||||
2011-03-30 10:05 | Brad King | Resolution | open => fixed | |||||||
2011-06-17 18:40 | David Cole | Fixed in Version | => CMake 2.8.5 | |||||||
2011-06-17 18:40 | David Cole | Target Version | => CMake 2.8.5 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|