MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0012908 | CMake | CMake | public | 2012-01-23 13:31 | 2012-09-03 16:01 |
| Reporter | Christopher Sean Morrison | ||||
| Assigned To | Brad King | ||||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | CMake 2.8.8 | Fixed in Version | CMake 2.8.8 | ||
| Summary | 0012908: Emacs cmake mode indents incorrectly after multiline SET() | ||||
| Description | Summary says it all. If you define a macro that calls set, it will think the previous line indentation was at that unindented level. See the example in the Steps to Reproduce section. Fortunately, it seems a fix was easy. See attached. | ||||
| Steps To Reproduce | Indenting this region results in the lines after the DIRNAME_SRC set line all being at beginning of line. MACRO(BRLCAD_CHECK_DIRNAME) SET(DIRNAME_SRC " #include <libgen.h> int main(int argc, char *argv[]) { (void)dirname(argv[0]); return 0; }") CHECK_C_SOURCE_RUNS("${DIRNAME_SRC}" HAVE_DIRNAME) IF(HAVE_DIRNAME) FILE(APPEND ${CONFIG_H_FILE} "#define HAVE_DIRNAME 1\n") ENDIF(HAVE_DIRNAME) ENDMACRO(BRLCAD_CHECK_DIRNAME var) | ||||
| Additional Information | Conveniently, there was already a cmake-line-starts-inside-string() function we could key off of, so we keep walking backwards until we find an actual statement inside cmake-find-last-indented-line(). | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | https://public.kitware.com/Bug/file/4197/cmake-mode-set-indent.patch | ||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2012-01-23 13:31 | Christopher Sean Morrison | New Issue | |||
| 2012-01-23 13:31 | Christopher Sean Morrison | File Added: cmake-mode-set-indent.patch | |||
| 2012-01-23 14:05 | Brad King | Note Added: 0028393 | |||
| 2012-01-23 14:05 | Brad King | Status | new => resolved | ||
| 2012-01-23 14:05 | Brad King | Resolution | open => fixed | ||
| 2012-01-23 14:05 | Brad King | Assigned To | => Brad King | ||
| 2012-04-19 15:44 | David Cole | Fixed in Version | => CMake 2.8.8 | ||
| 2012-04-19 15:44 | David Cole | Target Version | => CMake 2.8.8 | ||
| 2012-09-03 16:01 | David Cole | Note Added: 0030875 | |||
| 2012-09-03 16:01 | David Cole | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||