[CMake] Semicolons in command options

Sam Baker sam.baker at bigfishgames.com
Tue Oct 21 17:08:15 EDT 2008


Change your set command to set (FOO "one;two;three")

The ; notation without quotes is used for declaring lists of strings.
With quotes, FOO will be a single string instead.

Sam 

-----Original Message-----
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf
Of Eric (Brad) Lemings
Sent: Tuesday, October 21, 2008 2:01 PM
To: cmake at cmake.org
Subject: [CMake] Semicolons in command options

Why does CMake do this and how can I tell it to NOT replace semicolons
with spaces?

CMakeLists.txt:
    set (FOO one;two;three)
    add_custom_target (foo.exe ALL
        myCmd -I${FOO}
        VERBATIM)

CMake Output:
        myCmd -Ione two three

Thanks,
Eric.

_______________________________________________
CMake mailing list
CMake at cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Big Fish Games, Inc. A New Game Every Day!



More information about the CMake mailing list