The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=15070
======================================================================
Reported By: Vitali
Assigned To:
======================================================================
Project: CMake
Issue ID: 15070
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-08-07 15:02 EDT
Last Modified: 2014-08-07 15:02 EDT
======================================================================
Summary: CMake doesn't escape # properly in
add_compile_options with Makefile generator
Description:
add_compile_options appears to generate the wrong escape sequence for:
add_compile_options("-Wno-error=#warnings")
when used in conjuction with the Makefile generator
Steps to Reproduce:
add_compile_options("-Wno-error=#warnings")
Use makefile generator
Look at flags.make:
CXX_FLAGS = ... "-Wno-error=#warnings" ...
It should be:
CXX_FLAGS = "-Wno-error=\#warnings"
due to shell-expansion (otherwise # gets treated as a comment).
Additional Information:
No amount of escaping in CMake fixes this.
It looks like CMake is already aware of \ escaping for the Makefile generator
but not for #:
add_compile_options("-Wno-error=\#warnings")
CXX_FLAGS = ... "-Wno-error=#warnings" ...
add_compile_options("-Wno-error=\\#warnings")
CXX_FLAGS = ... "-Wno-error=\\#warnings" ...
add_compile_options("-Wno-error=\\\#warnings")
CXX_FLAGS = ... "-Wno-error=\\#warnings" ...
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-08-07 15:02 Vitali New 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