On Sat, Nov 30, 2013 at 7:08 PM, Scott Kostyshak <[email protected]> wrote:

> commit 374cf6a39f321c7843b36aab242e0852b01887b8
> Author: Scott Kostyshak <[email protected]>
> Date:   Fri Nov 29 21:08:48 2013 -0500
>
>     CMake: allow compile-time C++ flags to be set
>
>     For example, one could run CMake as follows:
>       cmake -DLYX_CXX_FLAGS_EXTRA="-Werror"
>
>     Thanks to Kornel.
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index c285dc0..c0fd673 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -468,6 +468,10 @@ if(NOT MSVC)
>         endif()
>  endif()
>
> +if(LYX_CXX_FLAGS_EXTRA)
> +       add_definitions(${LYX_CXX_FLAGS_EXTRA})
> +endif()
> +
>  find_package(Qt5Core QUIET)
>  if (Qt5Core_FOUND)
>         find_package(Qt5Widgets REQUIRED)
>

Does this work well in the CMake gui as well ?

I would expect some line like set(LYX_CXX_FLAGS_EXTRA "" CACHE STRING
"Extra compiler flags")

Vincent

Reply via email to