[CMake] ; list

Haocheng Liu haocheng.liu at kitware.com
Thu Sep 21 09:35:16 EDT 2017


Hi Patrick,

On Thu, Sep 21, 2017 at 9:26 AM, Patrick Welche <prlw1 at cam.ac.uk> wrote:

> Having run cmake 3.9.2 once already, I see:
>
> $ cat CMakeLists.txt
> set(var one two)
> message(${var})
> $ cmake .
> onetwo
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /tmp/cmaketest
>
> Would you have expected "one;two" rather than "onetwo"?
>
> It should be "onetwo".
If you want it to be "one;two", then try
```cmake
message(${"var}") # Use quotes here
```

Reference link: https://cmake.org/Wiki/CMake/Language_Syntax

> Cheers,
>
> Patrick
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>



-- 
Best regards
Haocheng

Haocheng LIU
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4421 <(518)%20881-4421>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170921/087e9e2b/attachment.html>


More information about the CMake mailing list