| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0010107 | CMake | CMake | public | 2010-01-08 15:18 | 2016-06-10 14:31 | ||||
| Reporter | peastman | ||||||||
| Assigned To | Bill Hoffman | ||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||
| Status | closed | Resolution | moved | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | CMake-2-6 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0010107: file(READ removes semicolons | ||||||||
| Description | Use file(READ ...) to load the content of a file into a variable. Now look at the variable. You will see that all semicolons that were in the original file are missing. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0019065) Bill Hoffman (manager) 2010-01-08 16:19 |
How did you "look" at the variable? |
|
(0019066) peastman (reporter) 2010-01-08 16:23 |
In several different ways: message(), using configure_file() to insert it into a file, etc. After some experimentation, I've discovered that file(STRINGS ...) does not remove semicolons. So I'm quite certain the problem is not in how I'm looking at it. Loading the same file twice, once with READ and once with STRINGS, shows the semicolons in the second one but not the first one. |
|
(0019068) Bill Hoffman (manager) 2010-01-08 16:27 |
You want quotes around the var: foo.cmake file(READ ${CMAKE_SOURCE_DIR}/a.txt VAR) message("${VAR}") cmake -P foo.cmake This is some text;with some more; stuff |
|
(0019071) Bill Hoffman (manager) 2010-01-08 16:36 |
This might help: http://www.cmake.org/cmake/help/syntax.html [^] |
|
(0041637) 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 |
| 2010-01-08 15:18 | peastman | New Issue | |
| 2010-01-08 16:19 | Bill Hoffman | Note Added: 0019065 | |
| 2010-01-08 16:23 | peastman | Note Added: 0019066 | |
| 2010-01-08 16:27 | Bill Hoffman | Note Added: 0019068 | |
| 2010-01-08 16:27 | Bill Hoffman | Status | new => assigned |
| 2010-01-08 16:27 | Bill Hoffman | Assigned To | => Bill Hoffman |
| 2010-01-08 16:36 | Bill Hoffman | Note Added: 0019071 | |
| 2016-06-10 14:27 | Kitware Robot | Note Added: 0041637 | |
| 2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved |
| 2016-06-10 14:27 | Kitware Robot | Resolution | open => moved |
| 2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |