On Mon, Dec 2, 2013 at 11:50 AM, Kornel Benko <kor...@lyx.org> wrote:
> Am Montag, 2. Dezember 2013 um 09:00:30, schrieb Vincent van Ravesteijn < > v...@lyx.org> > > > On Sat, Nov 30, 2013 at 7:08 PM, Scott Kostyshak <skost...@lyx.org> > wrote: > > > > > > > commit 374cf6a39f321c7843b36aab242e0852b01887b8 > > > > Author: Scott Kostyshak <skost...@lyx.org> > > > > 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 ? > > > > No, and it should not do. It is not a cache variable. > > > > > I would expect some line like set(LYX_CXX_FLAGS_EXTRA "" CACHE STRING > > > "Extra compiler flags") > > > > Please no. Why do you want it in the cache? In my understanding it is for > developer only, > > searching for some warnings. > > > > > Vincent > > > > Kornel > Well, I'm using the CMake GUI, and I'm a developer. I wouldn't want to switch to the command line cmake just because of this one option. You can mark the option as advanced if you want... (IIRC). Vincent