|
From: James T. <ja...@fl...> - 2023-07-19 07:59:29
|
> On 18 Jul 2023, at 15:17, Florent Rougon <f.r...@fr...> wrote: > > I imagine this value is a CMake default. Maybe the above set() overrides > the cache value in the end during the build, however wouldn't it be more > logical to use CACHE for these set() calls? As I understand it, that > would allow people to override the default flags from the command line, > e.g.: > > cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \ > -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O3 -g" ... > > to avoid defining NDEBUG even in RelWithDebInfo builds. Of course, I'm > rather dumb at CMake, so... relying on your expertise. :) I tend to avoid CACHE unless I’m really *really* sure it makes sense, but indeed this probably is such an example where we want to change the default value from CMake, but still let people override with their own values. Kind regards, James |