Notes |
|
(0040752)
|
Brad King
|
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
|
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
|
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
|
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. |
|