Thanks Brad, I think I can use FLAGS for now then, but if my requirements get more complicated I'll use OPTIONS and require 3.11. I think the docs change would be helpful.
Cheers, Harry Harry Mallon CODEX | Senior Software Engineer 60 Poland Street | London | England | W1F 7NT E harry.mallon@codex.online | T +44 203 7000 989 On 01/05/2018, 14:13, "Brad King" <brad.k...@kitware.com> wrote: On 05/01/2018 06:33 AM, Harry Mallon wrote: > I just noticed that COMPILE_OPTIONS is 3.11.0 only. I can’t understand > from the docs which of COMPILE_OPTIONS or COMPILE_FLAGS is preferred > and why I might use one or the other. COMPILE_OPTIONS for targets has existed for a long time. What is new in 3.11 is COMPILE_OPTIONS for source files. COMPILE_FLAGS has existed for source files for a long time too. The difference is that COMPILE_FLAGS takes a command-line string of flags that requires manual escaping. COMPILE_OPTIONS takes a ;-list of flags and will do the escaping automatically. The docs of the two options should be updated to mention each other and make the distinction clear. -Brad -- 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: https://cmake.org/mailman/listinfo/cmake-developers