> - We seem to set CMAKE_VERBOSE_MAKEFILE to ON by default. This produces a
> large amount of output when building; I've found that switching it to OFF
> makes it much more easy to spot compiler warnings as it causes them to really
> stand out among the otherwise more concise output. Any opinions against
> making OFF the default setting for CMAKE_VERBOSE_MAKEFILE?

I think we should have -Werror defined in all modules anyway, so that we
are forced to deal with the warnings before the module will compile.

The verbose flag is on in the Manager so that I can see the actual command
doing the compilation.  The quiet build is much neater though.  I'm happy
if all the modules use the quiet build.

> - I've noticed that in a lot of CMakeLists.txt most or all of the flags listed
> in CMAKE_C_FLAGS are repeated in CMAKE_C_FLAGS_DEBUG. The way I understand
> cmake, CMAKE_C_FLAGS_DEBUG are used _in addition_ to CMAKE_C_FLAGS if
> CMAKE_BUILD is set to "Debug", which makes repeating flags in
> CMAKE_C_FLAGS_DEBUG pretty redundant. Or did I miss something?

       CMAKE_BUILD_TYPE

                          ...

              CMAKE_C_FLAGS_[Debug|Release|RelWithDebInfo|MinSizeRel].     For
              example,  if CMAKE_BUILD_TYPE is Debug, then CMAKE_C_FLAGS_DEBUG
              will be added to the CMAKE_C_FLAGS.

You are surely right.

> - In a number of places, we use exec_program to execute external executables
> like pkg-config and other *-config scripts. The cmake documentation lists
> exec_program as deprecated and suggests execute_process instead.
> execute_process is indeed more flexible and allows for a more robust build
> process, for example when a config script returns just a newline character.
> Should we start replacing exec_program with execute_process?

Yes, looks like the correct thing to do.

> - Should we make more use of the CMAKE_BUILD_TYPE variable? Right now, it is
> always set to "Debug", which is probably not what we want for release builds.
> I'd favor a single top-level switch to control the build type and set
> CMAKE_BUILD_TYPE accordingly in the sub-modules. Any opinions on that?

What do you mean by sub-modules?  openvas-libraries/base etc.?

"Debug" brings -g.  This means someone call attach a debugger in case of a
problem.  I'm OK with the releases including this.
_______________________________________________
Openvas-devel mailing list
Openvas-devel@wald.intevation.org
http://lists.wald.intevation.org/mailman/listinfo/openvas-devel

Reply via email to