[CMake] Double quotes being removed Windows removing compiler flags

François Best francois.best at eiosis.com
Wed Jul 11 12:54:09 EDT 2012


Hi David,

Unfortunately, even that syntax still removes the quotes in the generated
project, but thanks for the heads up!

@Andreas: I'm going to check your solution, thanks!

Best,

François Best
Hardware & Software Engineer

Eiosis - http://www.eiosis.com/



2012/7/11 David Cole <david.cole at kitware.com>

> The syntax in your original post is incorrect.
>
>
>   set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG} /Test1:"Test1")
>
> should be:
>
>
>   set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Test1:\"Test1\"")
>
> i.e., to CMake, the set call should look like two arguments here: the
> variable name and a double quoted string with any nested quotes escaped
> with a \ character
>
> The C and CXX flags variables are all single string values with multiple
> flags separated by spaces. With your original syntax, all the spaces get
> turned into semi-colons because there are multiple (more than just 2)
> arguments to the set command.
>
>
> HTH,
> David
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120711/b0ec697c/attachment.htm>


More information about the CMake mailing list