[CMake] Unwanted quoting of $

Brad King brad.king at kitware.com
Mon Jun 30 09:35:30 EDT 2008


Jarl Lindrud wrote:
> |
> | So what do I need to do to pass a $ character through to Visual 
> Studio, without the quotes? I’m using cmake 2.6.0 .
> |
> Just $$. I had the same problem and googled it here: 
> http://marc.info/?l=cmake&m=120043575105964&w=2
> 
> - -Wojciech
> 
> I tried that and it doesn't work either. I've also tried cmake 2.4.8, no luck with that either. I'm using the VS2008 generator.
> 
> Essentially, this means that it is impossible for me to get the following string into the compiler command line, as seen in Visual Studio:
> 
> /FU $(FrameworkDir)/v2.0.50727/System.dll
> 
> Whether I use ADD_DEFINES or SET_SOURCE_FILES_PROPERTIES, and regardless of any cmake escaping mechanism I've tried (e.g. \$, $$), what I get in Visual Studio is 
> 
> /FU "$"(FrameworkDir)/v2.0.50727/System.dll
> 
> Strangely, if the $ is part of a /D compiler switch, then it _is_ passed through verbatim. But not for any other compiler switch.
> 
> This appears to be a bug to me. Should I file it somewhere? 

No, it was fixed recently in CMake HEAD and will be in 2.6.1.

-Brad



More information about the CMake mailing list