On Sat, Nov 30, 2013 at 6:55 AM, Kornel Benko <kor...@lyx.org> wrote: > Am Freitag, 29. November 2013 um 23:55:32, schrieb Scott Kostyshak > <skost...@lyx.org> > >> On Fri, Nov 29, 2013 at 4:38 AM, Kornel Benko <kor...@lyx.org> wrote: > >> > Am Freitag, 29. November 2013 um 01:39:33, schrieb Scott Kostyshak > >> > <skost...@lyx.org> > >> > > >> >> How does one add compiler flags for the CMake version? Attached is a > >> > > >> >> patch that allows me to do the following: > >> > > >> >> > >> > > >> >> cmake -DCMAKE_CXX_FLAGS="-Werror" > >> > > >> > > >> > > >> > I would not try to overwrite a variable 'CMAKE_...'. > >> > > >> > (Such vars should be reserved for cmake) > >> > >> Ah, I will remember this. I had interpreted CMAKE_ variables to mean > >> variables that are commonly passed to CMake (across most programs). > >> > >> > Use -DLYX_CXX_FLAGS_EXTRA='-Werror -xxx -yyy' or such. > >> > > >> > > >> > > >> > And maybe later in CMakeLists.txt > >> > > >> > > >> > > >> > if(LYX_CXX_FLAGS_EXTRA) > >> > > >> > add_definitions(${LYX_CXX_FLAGS_EXTRA}) > >> > > >> > endif() > >> > > >> > > >> > > >> > to make it available for other compilers too. > >> > > >> > > >> > > >> >> Is there a different way that is recommended? > >> > > >> >> > >> > > >> >> Scott > >> > > >> > > >> > > >> > Kornel > >> > >> How about the attached patch? > > > > Looks good.
OK it's in at 374cf6a3. Scott