View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0016032 | CMake | CMake | public | 2016-03-22 15:06 | 2016-06-10 14:21 | ||||
Reporter | Braden McDaniel | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Platform | Apple | OS | Mac OS X | OS Version | 10.11.3 | ||||
Product Version | CMake 3.5 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0016032: CMake doesn't escape # properly in add_compile_options with Makefile generator | ||||||||
Description | This appears to have regressed in 3.5. If I do: add_compile_options(-Wno-#pragma-messages) I get -Wno- ...on the command line. | ||||||||
Tags | makefile | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0040752) Brad King (manager) 2016-03-22 15:24 |
$ cat ../CMakeLists.txt cmake_minimum_required(VERSION 3.4) project(Issue16032 C) add_compile_options("-Wno-#pragma-messages") add_executable(foo foo.c) $ cmake --version cmake version 3.5.0 $ cmake .. -- The C compiler identification is GNU 5.3.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Configuring done -- Generating done -- Build files have been written to: /.../b $ make VERBOSE=1 | grep pragma /usr/bin/cc "-Wno-#pragma-messages" -o CMakeFiles/foo.dir/foo.c.o -c "/.../foo.c" |
(0040753) Brad King (manager) 2016-03-22 15:25 |
> add_compile_options(-Wno-#pragma-messages) The "#" character on the line shown in the description will be parsed as the beginning of a line comment since it is not in a quoted argument. CMake reports an error on that line for me so please post a more complete example. |
(0040756) Braden McDaniel (reporter) 2016-03-23 14:20 |
Alright... Apparently I misunderstood some previous comments regarding how this is intended to operate. As to why I didn't observe an error: in my actual code, the closing parenthesis was on a separate line. This can be closed. |
(0041214) Kitware Robot (administrator) 2016-06-10 14:21 |
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 |
2016-03-22 15:06 | Braden McDaniel | New Issue | |
2016-03-22 15:08 | Braden McDaniel | Tag Attached: makefile | |
2016-03-22 15:24 | Brad King | Note Added: 0040752 | |
2016-03-22 15:25 | Brad King | Note Added: 0040753 | |
2016-03-23 14:20 | Braden McDaniel | Note Added: 0040756 | |
2016-03-23 14:21 | Brad King | Status | new => resolved |
2016-03-23 14:21 | Brad King | Resolution | open => no change required |
2016-06-10 14:21 | Kitware Robot | Note Added: 0041214 | |
2016-06-10 14:21 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |