[CMake] lack of operator for easy string concatenation

John Drescher drescherjm at gmail.com
Wed Apr 8 14:30:31 EDT 2009


On Wed, Apr 8, 2009 at 2:27 PM, Piotr Dobrogost
<pd at opensource.dobrogost.pl> wrote:
> Hi
>
> Am I missing something or there is no operator for easy string
> concatenation in cmake?
>
> Instead of writing
>
> SET(CMAKE_MODULE_PATH
> "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
>
> it would be nice to be able to write
>
> CMAKE_MODULE_PATH += "${CMAKE_CURRENT_SOURCE_DIR}/CMake;"
>
> or at least
>
> SET(CMAKE_MODULE_PATH += "${CMAKE_CURRENT_SOURCE_DIR}/CMake;")
>
> "+=" would mean to prepend to and "=+" to append to existing string.
>

I guess its a matter of preference. I prefer the first/working example.

John


More information about the CMake mailing list