View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015285CMakeCMakepublic2014-12-04 14:412015-05-04 09:05
ReporterBraden McDaniel 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product VersionCMake 3.0.2 
Target VersionFixed in Version 
Summary0015285: Cannot escape "#" in add_compile_options
DescriptionI'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 ReproduceFor 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 InformationThis is workable; but does not use add_compile_options:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-\\#pragma-messages")
TagsNo tags attached.
Attached Files

 Relationships
duplicate of 0015070closedBrad King CMake doesn't escape # properly in add_compile_options with Makefile generator 
related to 0014547closedKitware Robot Unix Makefile generator won't escape '#' 
related to 0013562closedKitware Robot Incorrect Makefiles generated for paths containing '#' 
related to 0014745closed Can't build a project if build directory contains '#' character, i.e. "issue#6" 

  Notes
(0037387)
Brad King (manager)
2014-12-04 14:48

Resolving as duplicate of 0015070.
(0038690)
Robert Maynard (manager)
2015-05-04 09:05

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2014-12-04 14:41 Braden McDaniel New Issue
2014-12-04 14:44 Brad King Relationship added related to 0014547
2014-12-04 14:44 Brad King Relationship added related to 0013562
2014-12-04 14:46 Brad King Relationship added related to 0014745
2014-12-04 14:46 Brad King Relationship added related to 0015070
2014-12-04 14:47 Brad King Relationship replaced duplicate of 0015070
2014-12-04 14:48 Brad King Note Added: 0037387
2014-12-04 14:48 Brad King Status new => resolved
2014-12-04 14:48 Brad King Resolution open => duplicate
2015-05-04 09:05 Robert Maynard Note Added: 0038690
2015-05-04 09:05 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team