MantisBT - CMake
View Issue Details
0015322CMakeCMakepublic2014-12-22 11:552015-05-04 09:05
Braden McDaniel 
 
normalminoralways
closedno change required 
CMake 3.1 
 
0015322: Double backslash to escape '#' in CMAKE_CXX_FLAGS no longer works
In versions of CMake prior to 3.1.0, this worked:

  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-\\#pragma-messages")

In CMake 3.1.0, that no longer works; this, however, does:

  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-#pragma-messages")

I'm not sure if this is a deliberate change or not; but it's a slightly annoying break with backward compatibility.
No tags attached.
related to 0015070closed Brad King CMake doesn't escape # properly in add_compile_options with Makefile generator 
Issue History
2014-12-22 11:55Braden McDanielNew Issue
2014-12-22 13:21Brad KingRelationship addedrelated to 0015070
2014-12-22 13:22Brad KingNote Added: 0037507
2014-12-22 13:23Brad KingStatusnew => resolved
2014-12-22 13:23Brad KingResolutionopen => no change required
2014-12-23 08:28Brad KingNote Added: 0037522
2015-05-04 09:05Robert MaynardNote Added: 0038708
2015-05-04 09:05Robert MaynardStatusresolved => closed

Notes
(0037507)
Brad King   
2014-12-22 13:22   
This is because CMake now correctly escapes # itself. See 0015070:0036604.
(0037522)
Brad King   
2014-12-23 08:28   
I've updated the 3.1 release notes to point out this behavior change:

 Help: Add 3.1 release note about '#' escaping in Makefiles
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d70a914 [^]
(0038708)
Robert Maynard   
2015-05-04 09:05   
Closing resolved issues that have not been updated in more than 4 months.