The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=15285
======================================================================
Reported By: Braden McDaniel
Assigned To:
======================================================================
Project: CMake
Issue ID: 15285
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-12-04 14:41 EST
Last Modified: 2014-12-04 14:41 EST
======================================================================
Summary: Cannot escape "#" in add_compile_options
Description:
I've found no way to escape the "#" character when it needs to occur in an
compiler option in the add_compile_options command. When adding such an option
to, for instance, the CMAKE_CXX_FLAGS variable, it can be escaped with a
backslash ("\"); but this does not appear to work when using
add_compile_options.
Steps to Reproduce:
For example:
add_compile_options(-Wno-\#pragma-messages)
In the generated output (using the Unix Makefile generator), this string is
added to the command line:
"-Wno-
Additional Information:
This is workable; but does not use add_compile_options:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-\\#pragma-messages")
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-12-04 14:41 Braden McDanielNew Issue
======================================================================
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers